uPrimitiveComponent->LineTraceComponent in Async Physics Tick

Hi,

I went over why these callbacks are executed in the game thread in the other post

Taking that into account, the reason you get the ensure it is because although the code is running on the game thread, it is outside the normal update loop (this is why the code does not check for IsGameThread() only).

Doing scene queries in threads outside the game thread (or the normal update loop) is not supported yet.

Depending on your needs, if you don’t need the results of the query immediately, we have an async scene query API that will still be executed in the game thread, but batched among other queries and run at the end of the frame.

As an example, this is one of the methods available