Godot 3.5.1.stable
I have a very fast moving point (hundreds of units / sec), currently implemented as a Spatial that advances its position each physics frame.
I would like to detect any colliders it passes through, and given its speed, it may pass right through one or multiple in a single physics frame.
I decided to try and implement this using PhysicsDirectSpaceState.intersect_ray(), casting from the previous position to the new position, then from the position of collision to the new position, etc, until there are no more colliders to be found between the old and new position.
Unfortunately this does not behave quite right when the previous physics update places the raycast start position within 0.01 units of a collider.
Using Bullet, casting from that distance does not detect the collider, and using GodotPhysics it does detect the collider, but it also detects the collider when casting from exactly on its surface, which is how I had intended to advance the ray.
I can see quite a few workarounds here involving adjusting various positions by slight margins, but given the inconsistencies between physics engines I imagine many would simply be misuses of unreliable behaviours, since I don't know how intersect_ray is supposed to behave/be used.
Maybe I am even taking completely the wrong approach and there is a better way do to this?
edit; I realize I was a tad unclear when I wrote this, I don't just want to know what colliders it passes through but I do actually want the collision position on the surface of the collider too.