Description
The FeetCollider
property of the PlayerController
class represents a BoxCollider
component that is used to define the collision boundaries for the player's feet. This collider is typically used to detect ground contact and manage interactions with the environment at the player's foot level.
Usage
To access or modify the FeetCollider
property, you can use the following syntax:
PlayerController playerController = new PlayerController();
BoxCollider feetCollider = playerController.FeetCollider;
// You can now use feetCollider to access or modify the collider's properties
Ensure that the PlayerController
instance is properly initialized and part of the scene before accessing this property.
Example
// Example of accessing the FeetCollider property
PlayerController playerController = new PlayerController();
BoxCollider feetCollider = playerController.FeetCollider;
// Example of modifying the FeetCollider's size
feetCollider.Size = new Vector3(1.0f, 0.5f, 1.0f);