Houdini 20.5 Nodes APEX nodes

dynamicpath::ProjectilePathFromSpeed

Creates a dynamic path representing the arc of a projectile that is launched between two positions with a specific initial speed.

On this page
Since 20.0

This node takes a gravity vector, along with the start position, end position, and initial speed of a projectile, and constructs a dynamic path based on the arc of the projectile.

Given an initial speed, there could be two possible projectile arcs - a short arc and a long arc. The prefershortpath input is used to determine which of these arcs is selected.

Inputs

gravity: Vector3

The force of gravity acting on the projectile.

startpos: Vector3

The start position of the projectile.

endpos: Vector3

The end position of the projectile.

starttime: Float

The time at which the projectile motion starts.

speed: Float

The initial speed of the projectile. If the speed is too slow, no valid projectile arc is constructed, and an invalid dynamic path is returned. If an invalid dynamic path appears as part of a layered dynamic path, the invalid layer is ignored. See dynamicpath::Evaluate for more information on dynamic path layers.

prefershortpath: Bool

If set to True, the shorter of the two possible arcs is selected. Otherwise, the longer arc is selected.

transitionin: Vector2

When layering this dynamic path onto another, transitionin determines the period in seconds before and after the beginning of the projectile motion to smooth the curves together.

transitionout: Vector2

When layering this dynamic path onto another, transitionout determines the period in seconds before and after the end of the projectile motion to smooth the curves together.

shiftbefore: Bool

When layering this dynamic path onto another, shiftbefore determines whether to shift the prior animation so that it ends where this path begins.

shiftafter: Bool

When layering this dynamic path onto another, shiftafter determines whether to shift the remaining animation so that it begins where this path ends.

replaceperiod: Float

When layering this dynamic path onto another, replaceperiod determines the period of the layered path to replace with this motion.

samplerate: Float

The sample rate of the scene. This is only used if roundlife is set to True.

roundlife: Bool

If set to True, the life of the projectile is rounded down to the nearest integer frame according to the samplerate.

Outputs

path: ApexDynamicPath

A dynamic path representing the arc of the projectile.

See also

APEX nodes