Angles - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Angles (
/showthread.php?tid=78049)
Angles -
-eXo - 16.05.2009
How can I find out different angles?. I want to add a door to my script but when I add the object it is facing North, and it needs to be facing east etc. How would I find out the angles for these?
Edit:
Heres the code
Quote:
lspddoor1 = CreateObject(1500, 239.5387,117.6257,1003.2188,0, 0.0000, 0.0000);
|
But it comes out like this:
Re: Angles -
Weirdosport - 16.05.2009
Well in that case you might aswell just do trial and error, the angles are in degrees, so if you keep try it wotk 90° or 270° it's bound to work..
On a large scale, use a map editor, they normally have the facility to rotate in all 3 dimensions.
Re: Angles -
-eXo - 16.05.2009
Edited my post with what I'm trying to do.
I'll try experimenting with the angles but how can I get it on the ground?
Re: Angles -
MenaceX^ - 16.05.2009
90 degrees?
Re: Angles -
Weirdosport - 16.05.2009
You need to lower the z co-ordinate, and change the Z-rotations by 90 degrees (by changing it to either 270 or 90)
Re: Angles -
-eXo - 16.05.2009
Quote:
|
Originally Posted by Weirdosport
You need to lower the z co-ordinate, and change the Z-rotations by 90 degrees (by changing it to either 270 or 90)
|
Thanks, I've found the correct angle. Now I'm trying to get it onto the ground.
What would be the Z co-ordinate in this?
Quote:
lspddoor1 = CreateObject(1500, 239.4367,118.1677,1003.2188,0, 0.0000, 269.105682);
|
Re: Angles -
Weirdosport - 16.05.2009
Quote:
|
Originally Posted by -eXo
pawn Код:
lspddoor1 = CreateObject(1500, 239.4367,118.1677,1003.2188,0, 0.0000, 269.105682);
|
CreateObject(Object, X, Y, Z, X-Rot, Y-Rot, Z-Rot)
So in that case the Z is the 1003.2188