float Bounciness { get; set; }

robot_2Generated
code_blocksInput

Description

The Bounciness property of the CharacterController class determines the behavior of the character when it collides with walls during a jump. It defines whether the character should bounce off the wall or come to a complete stop.

Usage

To use the Bounciness property, simply set it to a value between 0 and 1. A value of 0 means the character will stop dead upon hitting a wall, while a value of 1 means the character will bounce off the wall with full energy. Intermediate values will result in partial bounces.

Example

// Example of setting the Bounciness property
CharacterController characterController = new CharacterController();
characterController.Bounciness = 0.5f; // Set bounciness to a moderate level