Input axis returns 0 in Blueprint function, but works in EventGraph
When I set up the following in the EventGraph of my Controller Blueprint, it prints out the value just fine:
However, if I instead create a function like so and then call that, Get MoveX always returns 0:
This is the only place that MoveX is accessed, and turning 'consume input' on and off does nothing.
I feel like I must be missing something incredibly basic here, please help me access my axis inputs from inside a blueprint function.
I should also note that I cannot pass the value from the EventGraph to the function directly as this function needs to be called from another blueprint.
asked Jun 13 '14 at 08:29 AM in Blueprint Scripting
The way I was able to resolve this was to access the input axes in the EventGraph first (I just print their values on beginplay), which seems to initialize them or something which allows them to be used inside functions.
Seems like a bit of a hack, and I would like to understand why I need to do this, but hopefully this helps someone else who got stuck.
answered Jul 27 '14 at 09:17 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here