Rotations With Quaternion
#1

This below is my PIECE OF CODE: is a car boost that I want to use...

pawn Code:
new Float:vx, Float:vy, Float:vz;
GetPlayerCameraFrontVector(playerid, vx, vy, vz);
SetVehicleVelocity(GetPlayerVehicleID(playerid) ,vx*2,vy*2 ,vz*2);
SetVehicleZAngle(GetPlayerVehicleID(playerid),GetVehicleRotationQuat(playerid,-1,vx,vy,vz));
I want to set the vehicle's z angle basing on the camera direction. I used the "GetVehicleRotationQuat" function, but there is the second argument "w" and I don't know that I must write in this argument -.-"...

PLEASE, HELP ME!!!
Reply


Messages In This Thread
Rotations With Quaternion - by BlackAtom - 23.07.2012, 15:23
Re: Rotations With Quaternion - by Mauzen - 23.07.2012, 15:28

Forum Jump:


Users browsing this thread: 2 Guest(s)