bool RotateWithGround { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The RotateWithGround property of the PlayerController class determines whether the player's orientation should automatically adjust to match the rotation of the ground they are standing on. This can be useful for maintaining a natural alignment with sloped or moving surfaces, enhancing the realism of player movement in the game environment.

Usage

To use the RotateWithGround property, simply set it to true or false depending on whether you want the player to rotate with the ground:

PlayerController playerController = new PlayerController();
playerController.RotateWithGround = true; // Enable rotation with ground

Setting this property to true will cause the player to automatically align with the ground's rotation, while setting it to false will keep the player's orientation independent of the ground's rotation.

Example

PlayerController playerController = new PlayerController();
playerController.RotateWithGround = true; // Enable rotation with ground