prime31/CharacterController2D

Elevator glitch?

Opened this issue · 2 comments

I'm having a glitch with Tilemap Colliders where if the player gets "caught" on the edge of a tile, they will slowly start rising up to the closest surface.

Example can be found here: https://streamable.com/u9k8x

I have noticed this issue as well, I thought I was doing something wrong. I didn't think about the tilemap collider could of been causing it.

FBM2 commented

Hey so I found a fix for this I was having the exact same issue. In the CharacterController2D script inside the method recalculateDistanceBetweenRays(), you can change (totalVerticalRays - 1) to just (totalVerticalRays). This worked for me and I haven't had any issues with it so far.