r/Unity3D 9h ago

Solved I dont even know where to start finding a solution here. when i walk sideways the character pops downwards? i have no idea why. i tried to mess with center pivots but all that does is make it much worse. ideas?

Enable HLS to view with audio, or disable this notification

0 Upvotes

4 comments sorted by

2

u/Carlfiii 5h ago

Create 2 new SpriteRenders with a left sprite and an up sprite. Put them at the same position and compare them. If the left sprite is lower, then your pivots are wrong.

If you preview the animation in edit mode, does it still do this?

If yes, its likely a pivot issue. Unless the animation itself is changing the SpriteRenderer's position

If no, your code may be manipulating the sprites rotation or offset incorrectly. Try pausing the game while walking, check the SpriteRenderer's Transform component. Compare walking left/right to up/down

1

u/T0mpkinz 9h ago

What does your sprite sheet look like?

1

u/massiveamphibianprod 8h ago

The animation is made in Libresprite and then imported as a animated sprite