- Home /
Problem with non kinetic rigidbody and interpolation
Not sure if it is a normal behavior :
For the two exact same rigidbody (with interpolation set to interpolate), having it kinetic or not will affect interpolation. The non kinetic rigidbody will stutter if timescale is reduced, not the kinetic one. (i suppose timescale make it just more obvious)
i was able to reproduce it in version 2018.3.0f2 and 2019.1.0a10
Rigidbody rb;
void Start()
{
rb = GetComponent<Rigidbody>();
Time.timeScale = 0.2f;
}
void FixedUpdate()
{
rb.MovePosition(rb.position + transform.forward * 10.0f * Time.fixedDeltaTime);
}
Answer by Vega4Life · Dec 17, 2018 at 08:06 PM
This makes sense to me. MovePosition() and interpolate (on a rigidbody that is kinetic) will have a smooth transition between the positions.
On a rigidbody that is non-kinematic, MovePosition() is essentially the equivalent to just moving the transform. It will just skip to the exact position, instead of a smooth transition.
MovePosition() is useful for smooth transitions with kinematic gameObjects, but not vice versa.
Yeah i found on the bottom of the $$anonymous$$ovePosition's documentation that it is the normal behavior. Having the same method behave diferently dosen't make a lot of sens to me in term of usability but why not.
I agree. I never found $$anonymous$$ovePosition() useful in the way it's setup. If you mark it as $$anonymous$$inematic, now it doesn't collide with things, etc. Seems weird.
Your answer
Follow this Question
Related Questions
Moving and SweepTesting a kinematic Rigidbody multiple times within a single FixedUpdate() call 0 Answers
Kinematic RigidBody does not collide with Wall using MovePosition 2 Answers
Rigidbody.MovePosition was working perfectly, now completely frozen 0 Answers
Kinematic grenade bounce fake physics? 1 Answer
Rigidbody interpolation problem 0 Answers