look at movedirection

Hi how can i do, those the player model rotate in the move direction, and forward is Cam forward ?

I have here some examples, but neither work so like i need it.

1, the model rotate in movedirection but if i stop it rotate back to start pos.

playerModel.transform.forward = playerRig.velocity;

2, the model rotate in movedirection but if i stop it rotate back to start pos, and ignor the camera forward

Vector3 movement = new Vector3(input.x, 0.0f, input.z);

playerModel.transform.forward = movement;

3, the model rotate to camera forward but not to movment forward

playerModel.transform.forward = CamRotatePoint.transform.forward;

i need combination of this, or what other working thing.

This here

playerModel.transform.forward = playerRig.velocity;

but do a zero check

if (_rigidbody.velocity != Vector3.zero)
{
    _rigidbody.transform.forward = _rigidbody.velocity;
}

this is what solved it for me