What do PositionPitchFactor & Control PitchFactor mean?

Hi,

I still don’t get the idea of PositionPitchFactor & ControlPitchFactor. Could anyone explain more about this so I can have a better idea ? Also, I still don’t understand how do you determine the number in the very beginning.

Thanks a lot in advanced
Ihshan

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.

Thanks a lot…it works now

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms