Setting an object rotation by the player's camera vector?
#4

As i have that problem too,
i tested that code but it doesnt change the rotation of the (attached) object:

new Float:tfx[6];
GetPlayerCameraFrontVector(playerid, tfx[0],tfx[1],tfx[2]);
SetObjectRot(gunobj, asin(tfx[2]), 0.0, 360 - atan2( tfx[0], tfx[1]));
Reply


Messages In This Thread
Setting an object rotation by the player's camera vector? - by [XST]O_x - 04.09.2010, 14:39
Re: Setting an object rotation by the player's camera vector? - by Mauzen - 04.09.2010, 14:43
Re: Setting an object rotation by the player's camera vector? - by [XST]O_x - 04.09.2010, 14:55
AW: Setting an object rotation by the player's camera vector? - by Trooper[Y] - 14.07.2012, 14:03

Forum Jump:


Users browsing this thread: 1 Guest(s)