Projectile failing to trigger hit at point-blank range (Chaos Physics/Destructible)

I’m currently combining the Niagara Example Pack with Content Examples to create a destructible environment where objects break when shot.

The issue: When the weapon is at point-blank range, the pillar doesn’t break at all. However, if I step back and shoot from a distance, it breaks normally.

At first, I thought the physics calculation couldn’t keep up with the projectile speed. I tested this by setting the Global Time Dilation to a very slow speed, and interestingly, the pillar broke even at point-blank range.

I have already enabled CCD (Continuous Collision Detection) on my projectile, but the issue persists at normal game speed. Does anyone know how to fix this or what might be causing the collision to fail only when shooting up close?

Any help would be appreciated! :face_holding_back_tears: :face_holding_back_tears: :face_holding_back_tears:

1 Like

Hey @Cherry_C1 !

So it’s likely that the problem is that the projectiles are moving past the surface of the collision before the next tick. Other ways you could test it include making the projectile longer/bigger, or making the projectile slower. If this is the problem, both of these things would cause a good response.

So typically, what would be done is something like:

Make a timer that starts an event when projectile is spawned with a fast-ish loop, but not on tick.
Check a location variable to see if it exists, if it does, continue, if not, end. This variable will be set at the end of the event. (OldLocation is what I usually name it)
Draw a line from OldLocation to current location using Line Trace by Channel.
If line trace by channel hits something, do a thing. Damage the enemy, whatever you need. The bullets themselves actually have no collision! This also saves on computing power.

You could probably do something along these lines using add impulse on the line trace hit’s normal or something.

Or just slow the bullet down. :slight_smile: I don’t know how slow it’d have to be, though.

Hope that helps!!

1 Like