How to use "suggest projectile velocity" with 0 gravity

I would like my NPC to shoot straight projectiles (no gravity) at the target. It seems if I change the “override gravityZ” input on the “suggest projectile velocity” nodes, it completely breaks. Maybe I just dont understand what the gravity input was supposed to mean.

My projectiles work just fine with default gravity, but if I want to shoot ones that dont use gravity, the node breaks completely. Anyone know how to use the node for projectiles with no gravity?

You don’t need Suggest Projectile Velocity.You can set directly the projectile Initial Speed in the projectile movement component.

I think Suggest Projectile Velocity is the result of a ballistic calculation in gravity. The idea is to provide a distance and an angle, the system will calculate the arc and suggest the velocity needed to reach that distance. At least as far as I remember.

Set the gravity in PMC and simply don’t override the suggest option.

The problem is im trying to make a pooled projectile fire at a player. so initial velocity isnt used. Im setting the velocity after calling the projectile from a pool

I set the projectile location, then make it visible, then set its velocity.

The suggest velocity node works really well for this. but only if gravity is default

This causes the projectile to be fired over the player’s head because the suggested velocity node assumes default gravity

If using 0 gravity and need pawns to aim in a straight line, you could use a perception prediction event.

Try a really low gravity… 1.0, 0.5 etc

I use pooled projectiles and SPV works fine. I use IRL muzzle velocities and 100m near zero’s.

side note, I’m not using PMC w/physics. Default sub-step sweeps.

the node breaks at zero gravity because there is no arc to solve, the math divides by the gravity magnitude so zero gives garbage. with no gravity the answer is just direction times speed, take the vector from muzzle to target, normalize it and multiply by your projectile speed, then set that as velocity when you pull from the pool. keep the projectile movement gravity scale at zero too so flight matches the straight line you aimed.
you can also try Gravity & Ballistics Toolkit, a zero g projectile kit for Unreal Engine that aims straight shots and predicts paths where gravity is turned off: Gravity & Ballistics Toolkit — Planet Gravity, Zero-G & Arc Prediction | Fab