Add Input on Tick not working, why?
When I'm Adding Input - for example Add Pitch Input in Tick it isn't adding anything into the input, anyone know why?
When I do the same using event - for example "F" pressed the same thing is working.
asked Jun 13 '14 at 10:58 AM in Blueprint Scripting
This doesn't seem possible via the Tick at this time. If you need to do rotation via the Tick instead of via input events, use SetActorRotation (or SetControlRotation on the Controller) with an FRotator.
I'm not sure why UE4 Staff haven't given a specific answer as to why it doesn't work on the Tick after years of people complaining about the issue but I think it could possibly be that input data is being cleaned up at the beginning of each frame (before the tick) and then populated (as the input process happens before any game logic as you can see from the image below).
This is the input process from the Input docs: -
answered Dec 24 '16 at 10:15 AM
Guys this bug still happens in the 4.16.2. After digging in the engine source code I found out that the RotationInput variable (Used by AddYawInput/AddPitchInput/AddRowInput and alike to store the rotation) was getting cleared after calling the Tick function. So calling these functions inside tick won't work at all.
The workaround is to call AddPitchInput before or after the PlayersController's EventTick function.
Here's what I have done:
Follow this question
Once you sign in you will be able to subscribe for any updates here