Rigidbody doesn't seem to apply gravity
Hi!
I have searched and searched but i can't seem to find anyone who has the same problem as i do. Here it is: I'm trying to make a 3D character jump with a rigidbody.AddForce. Pretty easy, i've done it hundreds of times; yet this time i can't seem to get it to work, the rigidbody just makes the character fly away very slowly and never falling, and if i increase the force magnitude, it juste teleports it further and then fall back extremely slowly. I thought it might have to do with the fact that the object i gave the rigidbody and collider to doesn't have any mesh directly attached to it, so i tried putting it to a lower object in my hierarchy that has a skinned mesh renderer attached to it, and it worked as intended on the collider, but the object wasn't the right one (it moves only the object's pivot or something idk) so i put the rigidbody and collider to another which is the actual root of the character's skeleton, so it's really just a transform, so there is no difference between this object and the parent, yet the same rigidbody and collider act differently...
Here are three videos to show the differences:
On the object i would like the rigidbody to be: https://youtu.be/WdP88Wx-hgk
On the object that has a mesh renderer: https://youtu.be/jxBVbYByRU8
On the root: https://youtu.be/0DmibPQYLZs
So really i don't understand what the difference between the two objects is and what i could do to make it work, could someone help me understand please?
Answer by ARKMs · Nov 03, 2015 at 06:58 AM
Check if you animation has keys in set the position of you character, If so, remove its, these affect the movement generated by the physical.
Perfect thanks! Indeed, i forgot to uncheck the "apply root motion" from the animator (that didn't work when i tried it), works perfectly fine now. Thank you!
Your answer
Follow this Question
Related Questions
Confused about how AddForce works 1 Answer
Ball Speed is not increasing as per code 0 Answers
Later grab doesn't jump 0 Answers
How do I get objects in front of the player to be blasted away? 1 Answer
How to remove addforce effect 0 Answers