# uPrimitiveComponent-\>LineTraceComponent in Async Physics Tick

**URL:** <https://forums.unrealengine.com/t/uprimitivecomponent-linetracecomponent-in-async-physics-tick/2349680>\
**Category:** C++\
**Tags:** line-trace, async, unreal-engine, question, CPP\
**Created:** [February 22, 2025, 1:42am UTC](https://forums.unrealengine.com/t/uprimitivecomponent-linetracecomponent-in-async-physics-tick/2349680 "2025-02-22T01:42:08Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![sergio.gardeazabal](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sergio.gardeazabal/32/924296_2.png) [@sergio.gardeazabal](https://forums.unrealengine.com/u/sergio.gardeazabal)\
**Post date:** [February 25, 2025, 8:26pm UTC](https://forums.unrealengine.com/t/uprimitivecomponent-linetracecomponent-in-async-physics-tick/2349680/2 "2025-02-25T20:26:45Z")

</div>

Hi,

I went over why these callbacks are executed in the game thread in the [other post](https://forums.unrealengine.com/t/is-async-physics-tick-really-async/2353151/2)

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

> **[UWorld::AsyncLineTraceByChannel | Unreal Engine 5.5 Documentation | Epic...](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Engine/Engine/UWorld/AsyncLineTraceByChannel)**
>
> Interface for Async.

---

_[View the full topic](https://forums.unrealengine.com/t/uprimitivecomponent-linetracecomponent-in-async-physics-tick/2349680)._
