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

Yeah, CCD only makes sense on the root body, unless you have objects joined together via constraints all simulating physics.

If you are using Projectile Movement, you need to call Set Updated Component in the construction script, and pass in the root primitive/component.

@Jambax Thanks for this info. Apologies for reviving an old thread but I’m curious what you would suggest if you have larger projectiles and don’t want them to stop until the center of the projectile meets an object in the environment?

I have a special class of projectile for larger projectiles (radius ~75units) that relies on Overlap. When the OnOverlap event fires (after the collision sphere’s edge overlaps), I do a line trace, detect the remaining distance it needs to travel and then delay stopping the projectile for the amount of time it needs to reach that distance (usually <= 0.2 seconds).

While it performs exactly how I’d like, as you say, Overlap is not efficient and I have to set every potential mesh in the world with ‘GenerateOverlapEvents’ which isn’t at all ideal, either.

However, if I used regular OnHit collision, the projectile immediately stops when an edge touches the ground. One idea I had was to spawn a duplicate projectile for the ~0.2 seconds more each projectile needs but that isn’t very efficient either.

Just curious if you have any ideas, thanks!

It sounds like you should consider using a separate sphere with a smaller radius as your root/updated component to detect hits in the center of your projectile, and have your VFX attached to that.

1 Like

So, that was one of my first solutions but it meant I needed to have two different collision spheres on each projectile (of which there can be hundreds on screen at once) and I didn’t like having ‘extra’ collision geometry, for performance reasons. It did work but you can’t make the inner sphere too small without risking missing collisions and if it’s not small enough, the projectile still appears to explode before hitting the center.

I already had a line trace happening on impact so I ended up just creating a branch for larger projectiles that delays their explosion according to the line trace distance.

This works but it’s not super performant, either - I have to balance how many of these type of projectiles can be on screen at once. I think the proper solution is to create a custom CPP projectile class, instead of relying upon the default ProjectileMovement, but it’s just been lower priority for me, as of late.

Two collision components in the same projectile.

The primary collision sphere should be small… the orb core.
Secondary collision sphere will act as the orb (overlap).