Event Tick BP node and Performance?

Just a quick question, i have heard and read that using the event tick node in blueprints for certain things can severely affect performance.

I have a timer in my player BP that start counting up when there is no WASD input detected, as soon as input is detected then the timer resets to 0. When the timer reaches a minute however then a Boolean on the player is set to true which causes the player camera to start panning slowly around the player to indicate an idle and possibly paused state. as soon as you touch WASD then the camera returns to normal and you can play on.

The only way i can get this this to work is to use the event tick node to constantly check when the timer gets to a minute to start the idle state, will something this small cause performance issues ???

It will not cause performance issues. …but why not use an actual Timer for this?

Thank you for replying! i thought i was using an actual timer :frowning: i am still pretty new to BP and programming in general. Here is screens of the basic BP’s i have powering this Camera Pan feature…

There’s nothing wrong with Tick per se. It’s what you put in there. If you start iterating through hundreds of actors every frame and casting, you will notice a performance drop eventually. But you’ll run into other limitations before that happens, most likely. If your current setup works, it’s fine - you’re doing it for a single actor, there’s no way in hell this translates into a performance penalty.

Alternatively, you can use this:


This will wait 5s and call PlayerBecameIdle. You can call *PlayerMoved *to reset it - so your WSAD can call that event to reset the timer:

Or, using your own code, rather than checking during Tick, check the value after adding 1 - in the Increment Idle Time function

None of the above has anything to do with performance though. If you can keep things out of Tick, you should do so, sure. Event Driven approach pays off and is easier to debug.

Thanx for the advice dude, i really like SetTimerByEvent :slight_smile: