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"

Tick and input actions order of execution

I was wondering about the order of execution concerning ticking and inputactions. Specifically I have an input action that causes the recalculation of a motor vector. This motorvector is added to the movementvector and the movement is then applied, each tick.

Is it possible that the tick continues doing whatever it's doing without ever waiting for whatever the inputaction does to finish? I don't know much about threading but does tick have its own thread possibly?


Product Version: Not Selected
more ▼

asked Apr 27 '15 at 12:21 PM in C++ Programming

avatar image

242 17 26 36

avatar image Rockseller Sep 05 '15 at 11:11 PM

Any answer to this?

avatar image ilias48rus Mar 14 '18 at 03:33 PM

answer plz

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

Ticks are executed asychronically (if multithreading is on) in groups called tick groups, here you got list of them (saddly this enum dissapered from API refrence so link is to github):


If one group is finished the other one is executed. You can switch tick group of invidual actor with this function:


You can also define invidual actors which need to be ticked before tick is triggered in specific actor


This way you can control order of actor ticking.

As for input i'm not sure, it probably updated before ticking is started. There function that let you check if specific button is pressed at the moment:


Which let you order up input checking too

more ▼

answered Sep 06 '15 at 04:23 AM

avatar image

36.6k 932 169 1111

avatar image UnrealDev00 Sep 20 '17 at 05:45 PM

Are you able to point to documentation or code that supports the claim that "ticks are executed asynchronously (if multithreading is on)"?

Writing code/blueprints to support that scale of multithreading is relatively advanced. Every access (read or write) to anything shared must be protected by a mutex to be threadsafe.

I'm pretty sure that the ticks in each tick group are run in serial on the main thread (though nothing prevents a tick from firing off some work to be done in parallel).

avatar image Shadowriver Sep 21 '17 at 10:31 PM

I can give you only link to code:


I might misunderstand something in this :p i also recently figured you need tick.AllowAsyncTickDispatch set 1 which is 0 by default

avatar image UnrealDev00 Oct 11 '17 at 04:40 PM

So I'm not an expert with the codebase, but I'm fairly certain that the tick groups are run in serial (though not on the main thread. which is contrary to what I said in my first reply).

What appears to run asynchronously is the dispatch of the tick groups. Specifically, the main thread will pass off the execution of a tick group to another thread allowing the main thread to chug along and do something else (I'm pretty sure the main thread just moves on to preparing the next tick group for execution).

The ticks in the tick group appear to be executed serially on the other thread.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

This is an old question - but the order of input delegate events vs actor ticking has been bugging me for a couple of days now and I think I found the answer by simply attaching the debugger to a compiled version of the engine (4.22 in this case), and checking the callstack when a bound input delegate is called:

APlayerController has a tickgroup of TG_PrePhysics: (more on tick groups) https://docs.unrealengine.com/en-us/Programming/UnrealArchitecture/Actors/Ticking

During the APlayerController tick, ProcessPlayerInput is called, which fires off all the bound delegates for registered InputComponents

So, bound input delegates are called during TG_PrePhysics - here's the callstack:

      UE4Editor-DASH.dll!ADASHPlayerActor::OnBeginDash() Line 123    C++
      [Inline Frame] UE4Editor-Engine.dll!TBaseDelegate<TTypeWrapper<void> >::Execute() Line 561    C++
      UE4Editor-Engine.dll!FInputActionUnifiedDelegate::Execute(const FKey Key) Line 252    C++
      UE4Editor-Engine.dll!UPlayerInput::ProcessInputStack(const TArray<UInputComponent *,FDefaultAllocator> & InputComponentStack, const float DeltaTime, const bool bGamePaused) Line 1306    C++
 >    UE4Editor-Engine.dll!APlayerController::ProcessPlayerInput(const float DeltaTime, const bool bGamePaused) Line 2473    C++
      UE4Editor-Engine.dll!APlayerController::TickPlayerInput(const float DeltaSeconds, const bool bGamePaused) Line 4461    C++
      UE4Editor-Engine.dll!APlayerController::PlayerTick(float DeltaTime) Line 2134    C++
      UE4Editor-Engine.dll!APlayerController::TickActor(float DeltaSeconds, ELevelTick TickType, FActorTickFunction & ThisTickFunction) Line 4601    C++
      UE4Editor-Engine.dll!FActorTickFunction::ExecuteTick(float DeltaTime, ELevelTick TickType, ENamedThreads::Type CurrentThread, const TRefCountPtr<FGraphEvent> & MyCompletionGraphEvent) Line 164    C++
      [Inline Frame] UE4Editor-Engine.dll!FTickFunctionTask::DoTask(ENamedThreads::Type) Line 285    C++

more ▼

answered May 24 '19 at 04:39 AM

avatar image

5 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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