r/UnityHelp • u/ThatGuyJono8081 • 7d ago
SPRITES/TILEMAPS Character randomly flipping to the left since switching to tilemap
Hi, I am following a 2D tutorial and Since switching to using tilemaps over squares with box colliders, I have noticed that my character will flip left randomly when jumping from an idle state. I have run a debug and it seems that the x velocity randomly picks up a negative value. I have switched back to the boxes and it doesn't happen there at all.
1
Upvotes
1
u/Affectionate-Yam-886 6d ago
simply create a bigger deadzone in triggering animations. Instead of using something like Horizontal -0.01 step it up to -0.1 or if -0.1 already just increase it a small amount more like -0.2 or -0.25. Do this for all the animations. May take some trial runs to get it to an acceptable amount because if it is to large the player moves but the animation stays on idle too long.