Documentation
    Preparing search index...

    Class ParabolicTrajectory

    Constant-acceleration flight (§13 "parabolic"; "ballistic" with gravity — see BallisticTrajectory).

    p(t) = from + v₀ · t + ½ · a · t²
    v(t) = v₀ + a · t
    a(t) = a
    

    Hierarchy (View Summary)

    Implements

    Index
    acceleration: Vector3

    Constant acceleration.

    duration: number

    Ballistic flight time: the time at which the path returns to the plane through from perpendicular to acceleration, i.e. -2 · (v₀ · â) / |a|.

    For the usual case — launched upward under gravity — this is the familiar 2 · v₀ᵧ / 9.81, and duration / 2 is the apex. It is Infinity when the path never returns (zero acceleration, or an initial velocity with no component opposing the acceleration), because there is no other honest answer; pass duration explicitly for a fixed preview window.

    from: Vector3

    Position at time = 0.

    initialVelocity: Vector3

    Velocity at time = 0.