![]() ![]() My rule of thumb is that when something needs to tick more than 10 times per second use Tick (you can set the rate of Tick on the Actor) otherwise use a Timer.Įither way remember that Tick by itself is not demanding it is what it does that can be demanding and the amount of Actors it is Ticking on concurrently. Remember to stop Ticking Actors from ticking when the tick isn’t needed though instead of adding a bool check at the beginning of the tick. Timers lose their benefit when they have to trigger almost as fast as a normal tick since tick has no overhead between ticks, it just ticks unless if the TickInterval is greater than 0. The TimerManager schedule each timer efficiently. A lot of logic doesn't need to update 60 times a second, so with a Timer, you can set it to update 10 times a second, or 0.1 in the Timer. It's easy to google and understand it and the ue4 documents show a health/damage system using a Timer. The benefit of timers is that they don’t have any noteworthy overhead between their ticks so it is better than a normal tick making its own individual check on every tick on every actor. With a timer you can set the exact tick rate of the event. Tick by itself doesn’t have any particular overhead, in fact Timers have more overhead than tick if you want the timer to “tick” very often. Is there some limitation of Event Timers that I’m not aware of, or is Event Tick actually firing more than once per frame? I’m just trying to understand why this might be. 0.01 timer is wait for 10 ms before its execute your code, while 60 fps game calculate every 16.666 ms. It’s not butter-smooth until I crank it up to about 240FPS or. 00833 to approximate 120FPS is almost there, but there are still micro stutters. Bumping the Timer speed up (or rather down) to. However, if I use a timer instead and set its time to 1/60 or 0.166, the actor stutters like hell. This parameter is a float that indicates the amount of time that passed. Because of this, I started using Set Timer By Event instead of Event Tick, however, for certain situations, like when I’m setting up pawn movement, it seems like I can’t get the speed of an Event Tick to be high enough.įor example, if I’m just adding a simple Actor Rotation based on Input If I drive it via Event Tick, it’s butter-smooth rotation even though I seem to be capped at 60 FPS in the editor. Right - click inside the Event Graph window, type in Tick, and select the. So the theory is that Event Tick shouldn’t be overutilized because it can cause excessive overhead with your game and that it’s also inconsistent because fluctuations in your FPS can cause it to run at an inconsistent speed. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |