Description
The EnablePressing
property of the PlayerController
class allows the player to interact with objects in the game world by using them, typically by pressing the designated "use" button. This property is a boolean value that, when set to true
, enables the interaction feature.
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; // Enable interaction
// Example of disabling the pressing feature
playerController.EnablePressing = false; // Disable interaction