SA-MP Forums Archive
Rot of the pos X, Y, Z MAP - 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)
+--- Thread: Rot of the pos X, Y, Z MAP (/showthread.php?tid=498178)



Rot of the pos X, Y, Z MAP - Noliax8 - 02.03.2014

Hi
I want create a system of object, i would any advice.

We can:

put, pose, and placed on the player

But, with the MapAndreas plugin, i can retrieve the pos Z with X, Y pos of the player ?
And, if the soil not flat at the horizontal, can i retrieve the rotation for to place the object correctly ? Otherwise, the object it's at horizontal and the soil it's at 50°... It's not perfect..

At 2:30
https://www.youtube.com/watch?v=UUEz...ature=*********

Thanks


Re : Rot of the pos X, Y, Z MAP - Noliax8 - 04.03.2014

Help please


Re: Rot of the pos X, Y, Z MAP - Crayder - 04.03.2014

MapAndreas plugin doesnt always give the correct Z float, adding Z-Rot, would be even worse...


Re : Rot of the pos X, Y, Z MAP - Noliax8 - 04.03.2014

How do then ? But my weapon is half in soil..


Re: Rot of the pos X, Y, Z MAP - Vince - 04.03.2014

Don't think it can be done. You need at least three points to form a triangle, so you can calculate an angle. For point A, you take the closest node or the location of the weapon (red dot). Once you know point B, you can calculate point C because that one is a right angle. But the question is: how to determine point B? The second closest point may not be on the slope and/or in a totally different direction.




Re : Rot of the pos X, Y, Z MAP - Noliax8 - 04.03.2014

So, is not possible ? Look this video

At 2:30
https://www.youtube.com/watch?v=UUEz...ature=*********

How have they does ?
Thanks


Re: Rot of the pos X, Y, Z MAP - Threshold - 04.03.2014

This is very possible. (As the video shows...)

I know the maths behind getting all the angles, and it's fairly easy to do. The only problem I'm having trouble working out, is what angles I actually need to find. Didn't Pottus give you a code for this already?? (Despite the whole getdist3d trouble...)


Re : Rot of the pos X, Y, Z MAP - Noliax8 - 04.03.2014

Yes, Optus gave me a code for this, but don't work.. I hoped someone help me..


Re : Rot of the pos X, Y, Z MAP - Noliax8 - 05.03.2014

help please