The problem is with this one.
Code: Select all
(setq AU_calcFireAngle (lambda (source gunAngle speed)
(block (unitvector objvel shotvectorcomponent)
(setq objVel (objGetVel Source))
(setq unitvector (sysvectordivide (sysvectorpolaroffset nil gunAngle 1) 100))
(setq shotvectorcomponent (sysvectormultiply unitvector speed))
(sysvectorangle (sysvectoradd objvel shotvectorcomponent))
)
))
The error can't be in sysVectorAngle because the horizontal component of objvel is correct. I think it can't be in sysVectorAdd for the same reason.