User Tools

Site Tools


4rpl:commands:ballisticarcpos

Index
Math Utility

BallisticArcPos

BallisticArcPos(<-start <-velocity <-gravity <-time) ->pos

Description

Calculates the position of a projectile after a period of time factoring in start position, velocity, and gravity. Useful to use in conjunction with the BallisticArcLateral function. This function uses the equation: start + time*velocity - [0, 0.5*gravity*time*time, 0]

- start: Vector location that projectile will fire from.
- velocity: The vector velocity (x,y,z) of the projectile.
- gravity: the acceleration due to gravity (in the y direction)
- time: The elapsed time.

Returns the vector position of the projectile

Examples

V3(10 1 10) ->start
V3(50 5 40) ->target
 
BallisticArcLateral(<-start 0.5 <-target 30) ->travelTime ->gravity ->fireVel
BallisticArcPos(<-start <-fireVel <-gravity 2) ->pos

Index

4rpl/commands/ballisticarcpos.txt · Last modified: 2022/12/28 12:35 by Vertu