User Tools

Site Tools


modding:function:syscalcfiresolution

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
modding:function:syscalcfiresolution [2012/03/17 01:18] – external edit 127.0.0.1modding:function:syscalcfiresolution [2014/12/27 04:40] (current) – external edit 127.0.0.1
Line 1: Line 1:
-Discuss this page on this pages TalkPage+Discuss this page on this pag's [[sysCalcFireSolution Talk Page|Talk Page]]
  
-sysCalcFireSolution+=== sysCalcFireSolution ===
  
-See sysCalcFireSolution at Xelerus+See [[http://xelerus.de/index.php?s=functions&function=356|sysCalcFireSolution at Xelerus]]
  
-Syntax  (sysCalcFireSolution targetPos targetVel speed) +Syntax (sysCalcFireSolution targetPos targetVel speed) -> angle or nil | 
-Arguments  targetPos the vector position of the target +Arguments targetPosthe vector position of the target | 
-  targetVel the vector velocity of the target +^ | targetVelthe vector velocity of the target | 
-  speed the speed of the projectile +^ | speedthe speed of the projectile | 
-Returns  angle or nil +Returns angle or nil | 
-Category math, weapon  +Category math, weapon | 
-Description  A very useful function when using sysCreateWeaponFire. Automactically performs all trigonometry required to properly lead a target (assuming it moves in a straight line at constant speed)  +Description A very useful function when using [[modding/function/syscreateweaponfire|sysCreateWeaponFire]]
-Example (sysCalcFireSolution (objGetpos aTargetobj) (objGetVel aTargetObj) (objGetVel gPlayerShip)) will return the correct angle to fire a projectile in order to hit aTargetObj) + 
-  +Automatically performs all trigonometry required to properly lead a target (assuming it moves in a straight line at constant speed)  
-Return to Functions list+ 
 +=== Example ===  
 + 
 +<code lisp>(sysCalcFireSolution (objGetpos aTargetobj) (objGetVel aTargetObj) (objGetVel gPlayerShip))</code> 
 +Will return the correct angle to fire a projectile in order to hit aTargetObj 
 + 
 + Return to [[:Functions]] list
modding/function/syscalcfiresolution.1331947122.txt.gz · Last modified: 2014/12/27 04:40 (external edit)