Topic was automatically imported from the old Question2Answer platform.
Asked By
mark_90
Old Version
Published before Godot 3 was released.
Problem
What are the best best practices when dealing with very high velocity objects that shoot through other colliders and why do they do so in the first place.
However, even though some of the answers do work, they are not ‘optimal’. E.g. limiting the speed of a high velocity object seems to be a remedy but not the cure. Furthermore, I fail to see why objects shoot through colliders in the first place.
All the answers on that post are good for normal uses.
Godot CCD works with small objects at around 10k units/s which is really high (ray based CCD gives incorrect results but the collision point is the same as shape).
If you want insane speeds then you will have to make your own CCD technique, Godot offers many tools to do your own physics.
Why objects shoot through colliders? because of tunneling.
A ray cast to the bullet’s current velocity vector from the bullet’s current location seems like the simplest and dumbest solution to tunneling.
Per frame delta, ofc.
Performance cost, no idea. Doing a ray cast every frame? pff. Doing 10k ray cast per frame, need RTX!