Fast moving projectile with Niagara trail - starts rendering too far away from the spawn location

Hyper_Recursive
Fri, 24 Mar 2023 21:02:46 +0000
FX

Hello everyone!

I have a question in regard to spawning (very) fast-moving projectiles and the Niagara particle effect. The problem I’m having is that:

1. The effect starts not at the projectile spawn location, but further down the projectile path.

2. The effect is not rendered at some distance before the collision.

In the first case, my assumption is that since the render thread is behind one or two frames, the projectile location is changed already when it’s rendered. However, I’m using the ProjectileMovementComponent with bUpdateOnlyIfRendered set to true.

In the second case, basically, the same assumption - the collision is registered and the particle system is deactivated before it is moved to the collision point. I think I know how to fix this one, however.

Here’s a demonstration of what I described above - it seems like the projectile is spawned too far away from the barrel. However, if you slow down the velocity, the spawn location is exactly where the socket is.

https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/b/c/0bc904d011cea47c0b1b5fa0410ce6e1fdf7a362.mp4

The projectile is a simple blueprint actor with a Box collision as a root component, Niagara system as a child of that Box, and a ProjectileMovementComponent.

I checked the Niagara system and it has no delays I could find. I tried “spawn per unit” to no avail. If I set the global time dilation below zero (say, 0.4), even fast projectiles start rendering particles closer to the barrel.

I appreciate your help!

10 posts - 7 participants