You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been having some trouble when the collider lands exactly on an edge (eg a 135 degree angle like below):
It happens maybe 1 in 5 times as it's not exactly easy to hit the precise spot that breaks it, but when it happens it launches the player in the opposite direction, I have tried playing with the number of rays, and the skin width and all sorts but in the end I made a simple adjustment that seem to fix it.
On line 470 of CharacterCollider2D.cs add "return false;" within the handleHorizontalSlope method:
else // too steep. get out of here
{
deltaMovement.x = 0;
return false;
}
At the beginning of this method it will simply return false if the wall is greater than 90 degrees, but otherwise it checks some variables, does some deltaMovement work and returns true regardless of whether the slope still over the threshold that the user sets in slopeLimit
It seems to work for me now I have added it. Maybe someone else has experienced this issue and hopefully this helps.
The text was updated successfully, but these errors were encountered:
I have been having some trouble when the collider lands exactly on an edge (eg a 135 degree angle like below):
It happens maybe 1 in 5 times as it's not exactly easy to hit the precise spot that breaks it, but when it happens it launches the player in the opposite direction, I have tried playing with the number of rays, and the skin width and all sorts but in the end I made a simple adjustment that seem to fix it.
On line 470 of CharacterCollider2D.cs add "return false;" within the handleHorizontalSlope method:
At the beginning of this method it will simply return false if the wall is greater than 90 degrees, but otherwise it checks some variables, does some deltaMovement work and returns true regardless of whether the slope still over the threshold that the user sets in
slopeLimit
It seems to work for me now I have added it. Maybe someone else has experienced this issue and hopefully this helps.
The text was updated successfully, but these errors were encountered: