string ToggleCameraModeButton { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The ToggleCameraModeButton property in the PlayerController class specifies the input action that toggles between different camera modes, such as first-person and third-person views. This property is a string that represents the name of the input action associated with toggling the camera mode.

Usage

To use the ToggleCameraModeButton property, assign it a string value that corresponds to the desired input action name. This input action should be defined in your input settings to handle the camera mode toggle functionality.

Example

// Example of setting the ToggleCameraModeButton property
PlayerController playerController = new PlayerController();
playerController.ToggleCameraModeButton = "ToggleCameraMode"; // Assign the input action name

// In your input handling logic
if (Input.Pressed(playerController.ToggleCameraModeButton))
{
    // Logic to toggle camera mode
    playerController.ThirdPerson = !playerController.ThirdPerson;
}