Hi master, I can’t understand why the following code
float pitch = transform.localPosition.y * pitchPositionFactor + yThrow * pitchControlFactor * Time.deltaTime;
why is it necessary to add "transform.localPosition.y * pitchPositionFactor "?
I tried to delete "transform.localPosition.y * pitchPositionFactor ".
float pitch =yThrow* pitchControlFactor * Time.deltaTime;//rotate around X-Axis
and then if the un-pressed the button, the rotation of object would be back to zero. this is that I want.
but when I pressed the button such as W, the value in Y is increased and ship’s head went up. the problem is the rotation is not smooth. it rotated on tiny angle and after a little time rotated again. in this course the button was kept pressing. how can I fix it?