Hi Ihshan,
Maybe it helps if I explain Ben’s goal in this lecture: He wants to have the ship rotated based on its position to make the movement of the ship look more interesting.
PositionPitchFactor
contains the maximum and minimum rotation value on the pitch axis based on the user input. And PositionPitchFactor
contains the output based on the position of the ship.
float pitchDueToPosition = transform.localPosition.y * positionPitchFactor;
float pitchDueToControlThrow = yThrow * controlPitchFactor;
float pitch = pitchDueToPosition + pitchDueToControlThrow;
And the combination of both values is the final pitch
value.
Maybe you could set both values to 0 to see how the ship behaves without any pitch
. Then increase one of the values and test your game again.