Trying to create a jump animation. Need help!

so I’m making a square spin while it jumps. The biggest problem I’m facing is that the square’s animation seems to interact with gravity. So if I jump in place, the square seems to spin perfectly fine and then comes back to ground. But when I try jumping left or right, instead of just playing the animation as it moves left or right in air, the square starts moving in weird unexpected ways when I press left or right. When I turn off the animation and jump, everything’s fine.

I’m using ForceMode2d.Impulse to jump. So according to my assumption its just a force that happens and goes away instead of constantly applying the force in which case the weird animation might make sense.

Things to isolate:

  • does the jumping work properly when animation is removed?

  • is the jumping using world coordinates (eg Vector3.up) or local coordinates (transform.up)

  • also check what you’re animating. If you want to animate a physics object, generally you want to only animate children of the Rigidbody, NOT the actual rigidbody itself, for obvious reasons.

Yes the jump is perfectly fine when animation is removed.

Yes I am using Vector3.up for jumping.

It’s just a square so it doesn’t have any children, it’s a rigidbofy as a whole.

Tho I still don’t know what to try when I get back home. Does your first point imply that generally the torso of a character is rigidbody-id and the rest if the body parts constitute the animations?

Did you change your user ID?

Hmm…that’s weird I don’t remember doing that l. But yeah why are the names different?

You’ve logged on as a user you created Aug 25 and not the user create on Oct 20 by the looks of it.