rotation object
#1

hello, how rotate an object like a Wheel?
with MoveObject and timer or other ?
thank you for your ideas
Reply
#2

Ah i get what you mean.

You should read this:

https://sampwiki.blast.hk/wiki/EditPlayerObject
Reply
#3

you do not understand, I want to rotate it alone
Reply
#4

Quote:
Originally Posted by Saliim
Посмотреть сообщение
you do not understand, I want to rotate it alone
then elaborate it more
Reply
#5

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).

Reply
#6

https://sampwiki.blast.hk/wiki/MoveObject

read this

.
Reply
#7

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
Reply
#8

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
Reply
#9

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
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)