sábado, 25 de fevereiro de 2017

BP Compendium 3: Enable Input

Enable Input


The "Enable Input" action is used to allow a Blueprint to respond to input events such as keyboard, mouse, and gamepad.

Input

  • Player Controller: A reference to the PlayerController in use.


Example Usage: 

The image below represents a Blueprint that only responds to input events when the player is near it. This blueprint uses a "Box Collision" type component to define the area the player needs to be in order to interact. The player is represented by the Blueprint "GamePlayerCharacter", when the player is overlapping the Blueprint, the action "Enable Input" is used. When the player walks away, the "Disable Input" action is used so that Blueprint no longer responds to input events.

Click to enlarge

As an example of interaction, imagine that the Blueprint above represents a lamp. This Blueprint has a "Point Light" component. When the player is near the Blueprint and press the right mouse button, the light will be turned on or off.