Godot Version
4.4
Question
Situation: Worker thread pool → grouptask → raycasting → checking collisions between units to see if there is a wall between them. The group task is called from the physics process and the physics state is stored in a variable.
The walls are tiles in a tilemap with phy layers. The raycast is correct 99% of the time and can tell if there is a wall between two units. however 1% of the time it will seem to forget a wall is there and allow the unit to attack.
(see large red debug line showing the raycast)
When I just run the same code in a loop over all the units in the physics thread, everything works fine.
I spent all day poking and prodding and looking around the internet, so now i come humbled to the alter of @smix8 and hope they will bless me with some knowledge.
thank you.