Blueprint Input Events - Once per frame?

I’m converting our input axis code from the old Project Settings Input to Enhanced Input. The original plan we had was that all the events would be handled in C++ and the pawn BP would receive Events from the C++. The modeler does the blueprints and one of them, our Flight Pawn, has extensive blueprint code. As I was converting, I noticed that in a few cases, the actual axis events were being handled in the Blueprint code directly. I’m trying to convert that now and came up with an issue that shocked me. I wanted to verify that it is normal that this concept is used in blueprint axis events.

The issue is that where ever he has set up an input axis event in BP, it appears from my debug Print Strings, the these events are ticking. What I mean is that regardless of whether the key in question is pressed or released, the input event fires once per frame. The ramifications are terrifying to me. It means that several heavyweight calculations are being done continuously. His code is developed to accomodate this once-per-frame behavior.

Do all blueprint axis events fire once per frame regardless of the status of the key presses and releases?

Obviously, when I implemented enhanced input from my C++ code, nothing worked correctly and this tickish behaviour explains that easily.

Hey @eagletree!

No, they do not. They should only fire when the axis leaves the deadzone, or when a button is pressed/held/released. Never when an axis is deadzone, or a button is not pressed. :slight_smile:

In fact there are specific nodes such as “GetKeyDown” to check if something is actively NOT pressed!

1 Like

Thanks for that. Now I’m going to have to figure why his are ‘ticking’. Since I’m converting to EI, what I’m observing through displays are the functioning within the deprecated input system. The solution of course it so restructure the BP so it doesn’t depend on this strange repetitive behavior. Thanks again.

I was revisiting this because so many of the BPs we have seemed to be depending on this tick-like behavior of the deprecated InputAxis Events. Normally I ignore the tooltips but I noticed the following:

Your answer had a caveat that it would not tick when in the deadzone, but apparently I am misunderstanding what the deadzone is, because I am definitely fighting with BPs that are designed around InputAxis events providing once per frame behaviors (the return of the current values and the execution pin firing). I’m trying to grasp how and when it doesn’t tick and when it does (not meaning the actual Tick event of course, just that these events were firing every frame, which is operationally the same). Can you shed light on this.

My EI mods have to either rewrite the logic so it doesn’t depend on a ticklike function, or place the functions being done directly on Tick Event (which I don’t want to do even on the C++ side).

In the case of the wheeled vehicle controller I’m trying to convert, the InputAxis event apparently would provide -1.0 or 1.0 when A or S was pressed yet provide 0.0 any time they weren’t which would cause the vehicle to slow down (slow reverse or slow forward) when the key was released. With EI, it of course does not do that, but rather doesn’t fire at all when they key axis function goes to Completed after releasing it. I can program around this different behavior but it does seem notable that the behavior existed and should be noted in the EI docs when moving to Enhanced Input.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.