0
Fixed

Player Collider Still Not Fixed

Crispy 1 year ago in Game Creator updated by Marti (Lead Developer) 1 year ago 7

Whenever the player collider hits a sudden change in height, the player suddenly moves backwards.

https://streamable.com/w3uck

Unity version:
2018.4.7f1
Game Creator version:
0.9.9

Answer

Answer
Fixed

Okay, this one's a bit tricky. The character walking backwards when hitting a wall at high speed should be solved. At least within our internal tests. Feel free to reopen this ticket if you stumble again.

On the other hand, when the character walks into a wall with a small slope on the floor, which is very near the wall, the character might start to jitter. This is not a bug, but part of the wall-sliding we have in place.

Let me explain. When the character hits a ground that is 45 or more degrees, it will start sliding down following the direction of the reflected normal of the collision (aka downhill). For this to occur, we check the inclination of the floor the character is on every frame and store the value.

When hitting a wall with a small slope, it touches the vertex of the slope, randomly returning a value between 30 and 60 degrees. Due to precision returning a value between these, the character will constantly change between a sliding and an idle state; hence the jittering state.


The solution is basically to remove the small slope of the floor.

Planned

Has happened a couple of times to us but we haven't been able to reproduce it consistently. I'll open a ticket and link this to it. Thanks!

I found it happens more often when Player Run Speed is higher (10+).

Okay, thanks for the feedback. I'll update the ticket and see if I can reproduce this when working on it!

Answer
Fixed

Okay, this one's a bit tricky. The character walking backwards when hitting a wall at high speed should be solved. At least within our internal tests. Feel free to reopen this ticket if you stumble again.

On the other hand, when the character walks into a wall with a small slope on the floor, which is very near the wall, the character might start to jitter. This is not a bug, but part of the wall-sliding we have in place.

Let me explain. When the character hits a ground that is 45 or more degrees, it will start sliding down following the direction of the reflected normal of the collision (aka downhill). For this to occur, we check the inclination of the floor the character is on every frame and store the value.

When hitting a wall with a small slope, it touches the vertex of the slope, randomly returning a value between 30 and 60 degrees. Due to precision returning a value between these, the character will constantly change between a sliding and an idle state; hence the jittering state.


The solution is basically to remove the small slope of the floor.

Would changing the Skin Width help?

Also, the character doesn't stop when the ground is no longer 45 degrees or greater: https://streamable.com/dijsy 

This is fixed in the next Game Creator iteration (1.0.1). The 45 degree angle is specified under the Character Controller component, where it says Slope Limit.