SA-MP Forums Archive
How to make objects like doors. - 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: How to make objects like doors. (/showthread.php?tid=562869)



How to make objects like doors. - Banditukas - 12.02.2015

Hi,

How to make any object opening like doors?


Re: How to make objects like doors. - IndependentGaming - 12.02.2015

set the object on the coordinates position then change the rotation coordinates on the same and then change the rotation X and Z a litle bit change the speed and there ya go


Re: How to make objects like doors. - Vince - 12.02.2015

An object always rotates around its pivot point. For normal doors that pivot point is placed to the side of the door with the hinges, but for any other object the pivot point is in the center of the object. So in short, you can't. At least not without a bunch of trigonometric calculations and even then it probably wouldn't look natural.


Re: How to make objects like doors. - DRIFT_HUNTER - 12.02.2015

Import doors object and see for yourself...


Re: How to make objects like doors. - Pottus - 12.02.2015

Quote:
Originally Posted by Vince
Посмотреть сообщение
An object always rotates around its pivot point. For normal doors that pivot point is placed to the side of the door with the hinges, but for any other object the pivot point is in the center of the object. So in short, you can't. At least not without a bunch of trigonometric calculations and even then it probably wouldn't look natural.
AttachObjectToObject() I always use the golf ball this should work also you can attach objects to certain ones to inherit dynamic properties such as a rotating object.