Player (RigidBody) jitters when colliding with object and jumping.
I know this question has been asked several times, but there are many different "solutions" and having tried some without luck, I thought I would see if anyone else could help.
I have been using the following code in my Update()
transform.Translate (Input.GetAxis ("xaxis") speed Time.deltaTime, Input.GetAxis ("Jump") jumpSpeed Time.deltaTime, Input.GetAxis ("zaxis") speed Time.deltaTime);
Which jitters on the end of a jump, i.e. when gravity is trying to push it down) and when I am walking into an object.
I switched from Update to FixedUpdate, which has lessened the problem, but it is still there.
I attempted to switch to the following code, but I still get the same problem (and my keys no longer worked how I was expecting.
GetComponent ().MovePosition(transform.position + new Vector3 (Input.GetAxis ("xaxis") speed Time.deltaTime, Input.GetAxis ("Jump") jumpSpeed Time.deltaTime, Input.GetAxis ("zaxis") speed Time.deltaTime));
I have read that perhaps I should be using AddForce - can anyone verify this and let me know how this works?
Thanks in advance!
Charlie
Your answer
Follow this Question
Related Questions
Counteracting rigidbody velocity using AddForce? 0 Answers
Rigid body robot animation 0 Answers
Rigidbody sticks to wall 0 Answers
Rigidbody bouncing off other rigidbodies 0 Answers