Projectiles going through objects without overlapping, even with continuous collision detection on?

Projectile Movement does not use Physics, so enabling the CCD flag or setting project settings for physics substepping will not help you here at all. The Projectile Movement component has it’s own settings for substepping (which are setup by default already), and it already performs CCD in it’s own way because it moves the object kinematically, by performing raycast sweeps through the scene to the target location.

The root component of your projectile should be it’s collision component - NOT a scene component or a default scene root. This can be a mesh or a collision sphere/capsule etc.

Overlaps are only generated when the projectile moves inside an object and stays there at the end of it’s movement frame. For performance reasons, you don’t want to substep overlaps updates (though you could probably edit the movement components ‘Tick’ function and force it to do so).

In terms of Physics, CCD does not help with detecting overlaps anyway - it’s only designed to prevent objects passing through blocking hits. If the projectile moves quickly, it will pass through overlap responses without generating events. You will always get this whether with Physics or Kinematic movement.

Projectile Movement has an “OnStopped” event you should bind to to detect the surface it hits - you shouldn’t really be using overlap events which are much more expensive (if anything, physics events like overlap generation should be disabled on projectiles).

10 Likes