Hello,
We are doing queries (like UWorld::LineTraceSingleByChannel) directly from the physics thread, from a sim callback in OnPreSimulate_Internal() call.
I have just discovered that these queries are processing the GTData, which does not seem safe to me.
After digging a little bit, I could see that
const EThreadQueryContext ThreadContext = GetThreadQueryContext(*World->GetPhysicsScene()->GetSolver());
is going through this
//TODO: need a way to know we are on a physics thread task (this isn't supported yet)
//For now just use interpolated data
return EThreadQueryContext::GTData;
Ideally, I feel like returning PTData in my case would be more safe.
Do you agree with it ?
If so, is there any solution to solve this TODO ?
Thanks a lot,
Romain
[Attachment Removed]