- Home /
Rigidbody2D: AddForce(0, y) adds different forces with animation although y is fixed
Hey guys,
I've participated at my first game jam last weekend and tried to finish up my first game. It failed due to some different reasons and I'm still left with an issue I can't really address.
I have a Rigidbody2D that can walk and jump. Everything worked fine until I added a "walking" animation that would simply rotate the characters legs back and forth. When this game object plays the walking animation it would suddenly jump much higher than it should. The added force however is constant as you can see in the code below.
When I disable the animation it works as intended again, so it must have something to do with the animation. I tried to activate the "Animate physics" property (although that wouldn't make that much sense anyways) but that didn't change anything. So, finally here is the code (hosted in Gist):
Your answer
Follow this Question
Related Questions
2D Animation does not start 1 Answer
2D game animation is running 1 Answer
How to create a 2D rig? 1 Answer
SpriteManager 2 1 Answer