rigidbody.MovePosition in local axes

I need object to move forward in local axes using rigidbody.MovePosition. Is it possible directly ? If not, how to calculate global position of object after moving forward (of course, i want to calculate it only, not to move object using transform.Translate or similar). Please help me, it is urgent.

The local axis direction is rigidbody.transform.forward or you can use the camera.transform.forward too.

rigidbody.MovePosition(rigidbody.transform.forward + speed * Time.deltaTime);

I hope it’s what you want.

You can calculate this very easily:

Vector3 someXVector = transform.rotation * Vector3.right * rightDistance;
Vector3 someYVector = transform.rotation * Vector3.up * upDistance;
Vector3 someZVector = transform.rotation * Vector3.forward * forwardDistance;