bool ThirdPerson { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The ThirdPerson property of the PlayerController class indicates whether the player is currently in third-person view mode. When set to true, the camera is positioned to provide a third-person perspective, typically showing the player's character from behind. When set to false, the camera switches to a first-person perspective, where the view is from the player's eyes.

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;

// Switch back to first-person view
playerController.ThirdPerson = false;