User Tools

Site Tools


modding:function:sysvectorpolarvelocity

Discuss this page on this page's Talk Page

sysVectorPolarVelocity

See sysVectorPolarVelocity at Xelerus

Syntax (sysVectorPolarVelocity number number)
Arguments number: The angle of the vector from 0 to 360. 0 is to the right.
number: the speed of the vector (in % of c)
Returns velVector: returns the new velocity vector
Category system, vector operator
Description A useful wrapper function for other velocity operator functions that require messy velVector arguments.

Example

(objSetVel gPlayerShip (sysVectorPolarVelocity (shpGetDirection gPlayerShip) 50))

Will cause the playership to scream forward at 50% lightspeed. A necessary function if you are using objIncVel or objSetVel which take velVectors as their velocity arguments.

Return to Functions list

modding/function/sysvectorpolarvelocity.txt · Last modified: 2014/12/27 04:40 by 127.0.0.1