rotation object - 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: rotation object (
/showthread.php?tid=607397)
rotation object -
Saliim - 19.05.2016
hello, how rotate an object like a Wheel?
with MoveObject and timer or other ?
thank you for your ideas
Re: rotation object -
justjamie - 19.05.2016
Ah i get what you mean.
You should read this:
https://sampwiki.blast.hk/wiki/EditPlayerObject
Re: rotation object -
Saliim - 19.05.2016
you do not understand, I want to rotate it alone
Re: rotation object -
justjamie - 19.05.2016
Quote:
Originally Posted by Saliim
you do not understand, I want to rotate it alone
|
then elaborate it more
Re: rotation object -
Konstantinos - 19.05.2016
Quote:
Originally Posted by Saliim
with MoveObject and timer or other ?
|
Yes, with MoveObject.
Quote:
This function can be used to make objects rotate smoothly. In order to achieve this however, the object must also be moved. The specified rotation is the rotation the object will have after the movement. Hence the object will not rotate when no movement is applied. For a script example take a look at the ferriswheel.pwn filterscript made by Kye included in the server package (SA-MP 0.3d and above).
|
Re: rotation object -
justjamie - 19.05.2016
https://sampwiki.blast.hk/wiki/MoveObject
read this
.
Re: rotation object -
AbyssMorgan - 19.05.2016
If the object is to rotate without moving and without bugs.
Use low speeds 0.005, and modify z value of small +/- 0.05 alternately
Re: rotation object -
Crayder - 19.05.2016
Quote:
Originally Posted by AbyssMorgan
If the object is to rotate without moving and without bugs.
Use low speeds 0.005, and modify z value of small +/- 0.05 alternately
|
0.05 is a bit much
I'd use like 0.00001, so it's absolutely unnoticeable
Re: rotation object -
AbyssMorgan - 19.05.2016
Quote:
Originally Posted by Crayder
0.05 is a bit much
I'd use like 0.00001, so it's absolutely unnoticeable
|
ok, speed must be less
Re: rotation object -
Crayder - 19.05.2016
Quote:
Originally Posted by AbyssMorgan
ok, speed must be less
|
Yeah, and might as well explain that...
The speed parameter is in units per second. This is regarding the time it takes to move from point A to point B, not the time it takes to go from rotation A to rotation B. Since you want to just rotate the object, you'll want to move it just slightly on the Z axis. As I suggested before, 0.00001 is ideal.
The rotations go from the current rotation to the wanted rotation, obviously. This takes place during the movement. So if you were rotating 90 degrees and you wanted it to take 10 seconds to do that, you would set the speed parameter to a 10th of the movement distance (0.00001 as discussed above), 0.000001.
With a basic door, you obviously wouldn't want the rotation to take 10 seconds... So 0.0000033 (a third of the distance) would make it three seconds.
That's basically the idea here.