I am working on a moving platform that needs to carry a rigidbody object. I figured rigidbody.MovePosition would work great but apparently not. This is my code:
newPos = Vector3. moveSpeed = float.
Doesn’t matter if I put this in Update or FixedUpdate, it gives the same result currently. (Yes, I know I should put it in FixedUpdate) So the newPos is set to 10, 0, 3 but it moves to approximately 1.6, 0, 0.5. I have no idea why. There is nothing in the code that sets it to do this.
Now for the rigidbody settings:
Use gravity = false
Is Kinematic = true
Interpolate = Interpolate
Collision Detection = Discrete
Can someone tell me what’s wrong and why it does this?
If Your Rigidbody has parent ,then the parents scale should be (1,1,1). And even if it’s parent is scaled, if you use Rigidbody.MovePosition(10,0,0) it will move rigidbody 10 meters in world space you just gonna see different values in Inspector, because of scaled parent.