Hello again! Another physics question for all y'all!
I've been working on a turn based strategy game lately. Obviously, the Godot docs are like the Godot Bible to me. One thing it mentions is that physics-related operations and queries (e.g. move_and_slide, raycasting) should be done in physics_process because to align with the physics step. In a turn based game though, the only changes to the physics space (at least that are obvious to me) happen during unit/pawn movement (assuming they are physicsbodies). While the player is deciding which pawn to move, everything is static. My current pathfinding algorithm for unit movement relies on making queries (possibly 10+ per path created) in order to find a valid path for a unit. So I doing only 1 query every frame is just too slow. So I've been doing them outside of physics_process and seems to not have any issues so far. My question is, in this situation, where it is guaranteed that nothing is changing - save the player's cursor location - does anyone have any insight as to if making these queries outside physics_process is generally safe? Or if there is a safe way to do this outside physics_process to keep speed up? I saw there's some good stuff in the docs about threads and thread safe operations, but not sure if it relates to the physics thread.