Greetings! I have been trying to solve a problem with a spaceship and when I spawn a projectile, it lags my projectile spawn behind when velocity increases. At first I thought this had to do with velocity inheritance (it may still do) but now I’m not so sure, because both the projectile and the muzzle flash emitter lag.
The ship (is using physics simulation with thrusters) spawns and attaches its turret on BeginPlay, and then the turret spawns a projectile on fire. The projectile is a simple sphere collision with a particle system. Please take a look at these pics:
The projectile will need to be faster than the ship or you can indeed overtake the projectile. Adding to the “inherited” velocity is probably the way to go as a missile would have a fixed speed leaving the cannon.
Make sure you remove friction on your projectile since you’re in space, the projectile should not slow down of its own velocity.
The thing is, I just used the Spawn Emitter Attached node for the muzzle flash and attached it to the socket of the turret’s barrel, and it still spawns away from the socket when my velocity is not zero.
I solved this, I think. In Cascade, the particle emitters have to be marked Use Local Space in the Required module. But the projectile speed itself seems to be calculated correctly