fRotX for SetPlayerAttachedObject
#2

There are two different angle systems used in samp (quite confusing, i guess this is a pawn library problem)
Without checking it (correct me if it is wrong, it might be the other way round):
The one, used in GetPlayerFacingAngle etc. is -0 to -180 for the "left side" and +0 to +180 for the "right side". 0 would be north, -90 west, 90 east, +/-180 south.
The other scale is used in floatsin and other float stuff. It counts anticlockwise, from 0 to 360. 0/360 would be north, 90 west, 180 south, 270 east.

To make both compatible with each other, do this:

new Float:angle;
GetPlayerFacingAngle(playerid, angle);
angle = 360 - angle;

In your case this would be:
SetPlayerAttachedObject(playerid, 1, 1318, 1, 0.755045, 0.161908, 0.036331, 360 - angle);
Reply


Messages In This Thread
angle problem - by MJ! - 30.12.2010, 19:01
Re: fRotX for SetPlayerAttachedObject - by Mauzen - 30.12.2010, 19:59
Re: fRotX for SetPlayerAttachedObject - by MJ! - 30.12.2010, 20:02
Re: fRotX for SetPlayerAttachedObject - by Mauzen - 30.12.2010, 20:31
Re: fRotX for SetPlayerAttachedObject - by MJ! - 01.01.2011, 18:24

Forum Jump:


Users browsing this thread: 2 Guest(s)