SuggestProjectileVelocity

SuggestProjectileVelocity

Windows
MacOS
Linux

Calculates an launch velocity for a projectile to hit a specified point.

Target is Gameplay Statics

SuggestProjectileVelocity
Start Location
X0
Y 0
Z 0
End Location
X0
Y 0
Z 0
Launch Speed
0.0
Override Gravity Z
0.0
Trace Option
DoNotTrace
Collision Radius
0.0
Favor High Arc
Draw Debug
Toss Velocity
X0
Y 0
Z 0
Return Value

Inputs

In
Exec
Start Location
Vector

Intended launch location

End Location
Vector

Desired landing location

Launch Speed
Float

Desired launch speed

Override Gravity Z
Float

Optional gravity override. 0 means "do not override".

Trace Option
ESuggestProjVelocityTraceOption Enum

Controls whether or not to validate a clear path by tracing along the calculated arc

Collision Radius
Float

Radius of the projectile (assumed spherical), used when tracing

Favor High Arc
Boolean

If true and there are 2 valid solutions, will return the higher arc. If false, will favor the lower arc.

Draw Debug
Boolean

When true, a debug arc is drawn (red for an invalid arc, green for a valid arc)

Outputs

Out
Exec
Toss Velocity
Vector

(output) Result launch velocity.

Return Value
Boolean

Returns false if there is no valid solution or the valid solutions are blocked. Returns true otherwise.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback