10.10.2010, 05:17
(
Последний раз редактировалось Austin; 10.10.2010 в 15:20.
)
Trying to come up with a stunt plane that fires exploding barrels.
Of course there is GetVehicleRotationQuat available to us, and I've seen it converted from Quaternion to Eulers, however although my math isn't too bad, these things are a little bit too advanced for me.
Here is a function I use the get the X/Y based on the input X/Y, that is at a certain angle/distance..
I'd like to make something similar to that, it would use the planes pitch/roll/banking/whatever to give me not only x/y, but z also, so that I can put a distance of 10.0 to place the object, and 400.0 for where it is heading to, I was thinking the function should be structured as the following...
... but how to achieve that, well that's why I'm here asking.
Thanks .
Of course there is GetVehicleRotationQuat available to us, and I've seen it converted from Quaternion to Eulers, however although my math isn't too bad, these things are a little bit too advanced for me.
Here is a function I use the get the X/Y based on the input X/Y, that is at a certain angle/distance..
Код:
GetXYInFrontOfSpawn(&Float:x, &Float:y, Float: a, Float:distance) { x += (distance * floatsin(-a, degrees)); y += (distance * floatcos(-a, degrees)); }
Код:
GetXYZInfrontOfVehicle(vid, &Float:x, &Float:y, &Float: Z, Float:distance)
Thanks .