Description
The PitchClamp
property in the PlayerController
class is used to define the range within which the player's pitch (vertical angle) can be adjusted. This property is particularly useful for controlling how much the player can look up or down, ensuring that the player's view remains within a realistic and playable range.
Usage
To use the PitchClamp
property, you can set it to a value between 0 and 180 degrees. This will limit the player's ability to look up or down beyond the specified range. For example, setting PitchClamp
to 90 will allow the player to look straight up and straight down, but not beyond those points.
Example
// Example of setting the PitchClamp property
PlayerController playerController = new PlayerController();
playerController.PitchClamp = 90.0f; // Allows looking straight up and down