Description
The ThirdPerson
property of the PlayerController
class indicates whether the player is in third-person view mode. When set to true
, the camera is positioned to provide a third-person perspective, typically behind and slightly above the player character. When set to false
, the camera is positioned for a first-person view, directly from the player's perspective.
Usage
To toggle between first-person and third-person views, you can set the ThirdPerson
property to true
or false
as needed. This can be useful for games that allow players to switch perspectives for different gameplay experiences.
Example
// Example of toggling third-person view
PlayerController playerController = new PlayerController();
// Enable third-person view
playerController.ThirdPerson = true;
// Disable third-person view (switch to first-person)
playerController.ThirdPerson = false;