Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

What is more efficient, Tick or Timer?

Question, Cannot find an answer for this any where!

Which of the following would be more efficient on say an escalator moving?  In this Epic training video to create an excalator he uses tick: https://www.youtube.com/watch?v=aqRUe7pm4Ok I have watched a few training Videos from Epic that say to never use tick because it is so inefficient.   In the comments of one of the videos I asked what you are supposed to use for a line trace if you cannot use tick, but no one responded.  I ended up changing my line trace to use Event Timer set to loop at second = .01, would it be better to use an Tick instead of the Event Timer?  I changed the Event Timer to .1 but it was too sluggish and had to change it back to .01.

1) Tick

2) Event Timer set to loop at second = 1

3) Event Timer set to loop at second = .1

4) Event Timer set to loop at second = .01

Product Version: UE 4.21
more ▼

asked Dec 22 '18 at 10:45 PM in Blueprint Scripting

avatar image

75 4 6 9

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

I think what this video was stateing is Using tick in blueprint is not efficient because blueprint VM is around 10 slower then native code in C++, and you only have 16ms to update game state for next frame in case of 60fps and all ticks needs to be fully executed to finish the frame, the more fps the time is even smaller. That why doing heavy operations on tick in blueprint is not recommended and you should move that in C++, but even there you need to watch out and don't do things like actor iteration (same things that "Get All Actors of Class" does)

There no difference between timer or tick if time is smaller then frame rendering time, so if you gonna do 0.01 which is 10ms it will execute in same rate as tick and take same amount of performance on 60fps, you need to do it higher time or else it does not make much sense. But keep in mind that timer depends on ticking to, there no sense of time in CPU, the way timer works that on each frame (same as tick is called), timer system checks if time has passed, if yes call binded function/event, so with using a little bit higher time and you care about precision function might be called in irregular way, using timer on small time is kind of iffy. Executing code every 2nd or 3rd tick is also viable option but it's frame dependent. So it really depends on what you trying to do.

In general if you want operation to run on every frame or time same or smaller then rendering timer then use of tick is better option

more ▼

answered Dec 22 '18 at 11:19 PM

avatar image

35.2k 921 166 1098

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question