Description : I’ve the RespondToRotateInput defined as below
private void RespondToRotateInput()
{
rocketShipRigidbody.freezeRotation = true;
...
rocketShipRigidbody.freezeRotation = false;
}
This is causing the slow motion effect, in the below video see how the rocket slowly rotates to ground after falling.
This is because the RespondToRotateInput function is always called from Update() and the freezeRotation is turned on and off every frame.
We should rather add a check as below to prevent it from happening, something like
private void RespondToRotateInput()
{
if (Input.GetKey(KeyCode.A) || Input.GetKey(KeyCode.D))
{
rocketShipRigidbody.freezeRotation = true;
...
rocketShipRigidbody.freezeRotation = false;
}
}
This seems to solve the issue, see below video, check the rotation after falling is now uniform (This check is also required in case of rocketShipRigidbody.angularVelocity = Vector3.zero;)
I was expecting this fix in lecture 71 Spit & Polish.
@ben Any comments?