Can't find MovePosition in rigidbody2D

I have an object with a rigidbody2D and a box collider 2D component. I’m trying to move the object with the following code:

rigidbody2D.MovePosition(rigidbody2D.position + Vector3.right * speed * Time.deltaTime);

I can’t find MovePosition inside rigidbody2D but I saw on the Unity official documentation that MovePosition should be in rigidbody2D :confused: I’m not sure about position, I haven’t checked the documentation for that one, so it could be that now it doesn’t belong there (even if in the original rigidbody there was rigidbody.position).

If you can tell me where to find MovePosition and position inside rigidbody2D I’d be so grateful.

Thanks for the help :slight_smile:

Rigidbody2D.MovePosition() was not in the initial releases of the 2D features. I’m running Unity 4.5.2, and the function is available. So upgrade to the latest and test again.