Game Development Reference
In-Depth Information
mouse input in the editor and for the touch input on the device. However, as you might re-
member, all the blueprints are based on an Actor.h class; this means, by default, they will
not accept any input, and any scripting-based input will be ignored and will not give any
result. So, you just need to define the player input to make the blueprint able to receive
those events from the mouse, touch, or any other available input device. To do this, there
are two ways, and I always like to use both these ways:
Enable input node : I assume that you've already added the scripting nodes inside
Event graph to set the dynamic material color via Set Vector Parameter Value .
This means you already have an Event Begin Play node, so you need to connect
its network to another node called Enable Input ; this node is responsible for for-
cing the current blueprint to accept input events. Finally, you can set its Player
Controller value to a Get Player Controller node and leave Player Index as 0
for the player number 1:
Autoreceive input option : By selecting the platform blueprint instance that
you've dropped inside the scene from the Scene Outliner , you will see that it has
many options in the Details panel on the right-hand side. By changing the Auto
Receive Input option to Player 0 under the Input option, this will have the same
effect as the previous solution:
Search WWH ::




Custom Search