- Home /
Rigidbody AddForce Up - different value.
Hello,
Why when i use
if(GetKeyDown("up") && IsGrounded()){
rigidbody.AddForce (Vector3.up *6000);
}
sometimes object jump higher then other one?
Thanks
Comment
Answer by Kiwasi · Jul 03, 2014 at 12:27 AM
You are calling this method in Update. Sometimes Update runs more then once per FixedUpdate cycle. Hence the force is added twice.
Move all physics stuff to FixedUpdate. Keep the input in Update.
Your answer
Follow this Question
Related Questions
Change rigidbody's jumping speed 2 Answers
moving with rigidbody without acceleration 0 Answers
AddForce Jump Problem 3 Answers
Jump off the edge of the object 1 Answer
jump on collision weird behaviour 2 Answers