Functions Documentation |
|
Name |
sysCalcTravelDistance |
Syntax |
(sysCalcTravelDistance speed time) -> distance in light-seconds |
Argument List |
speed: the speed of the ship
time: the time travelled |
Returns |
number: the distance in light-seconds |
Category |
system
|
Description |
Used to get travel distance in code. It calculates how far could be traveled in the given time with the given speed. |
Example |
taken from intComputeRandomEncounterCourse
; Interception point is wherever the player will be in 100 ticks
(setq interceptPos
(sysVectorPolarOffset theTarget (sysVectorAngle (objGetVel theTarget))
(sysCalcTravelDistance (objGetVel theTarget) 100)
)
)
|
Comment |
|