Description
The EnablePressing
property of the PlayerController
class allows the player to interact with objects by using them, typically by pressing the designated "use" button. This property is a boolean value that, when set to true
, enables the player to perform interactions with objects in the game environment.
Usage
To enable or disable the player's ability to interact with objects, set the EnablePressing
property to true
or false
respectively. This can be useful for controlling when a player can interact with objects, such as during specific game states or conditions.
Example
// Example of enabling the pressing feature for a player controller
PlayerController playerController = new PlayerController();
playerController.EnablePressing = true; // Allows the player to interact with objects
// Example of disabling the pressing feature
playerController.EnablePressing = false; // Disables interaction with objects