CapsuleCollider BodyCollider { get; set; }

robot_2Generated
code_blocksInput

Description

The BodyCollider property of the PlayerController class provides access to the player's main collider, which is a CapsuleCollider. This collider is used to define the physical boundaries of the player character in the game world, allowing for collision detection and response with other objects and surfaces.

Usage

To access or modify the player's body collider, you can use the BodyCollider property. This is useful for adjusting the player's collision properties, such as size or position, during gameplay.

Example

// Accessing the BodyCollider property
CapsuleCollider playerCollider = playerController.BodyCollider;

// Example: Adjusting the height of the player's collider
playerCollider.Height = 2.0f;