Smooth Rotation Help
#1

Hello, I am trying to figure out how to use Smooth Rotation, my script currently uses MoveDynamicObject to move gates, gates are a dynamic system in game.. Should I switch it to MoveObject? Help is appriciated
Reply
#2

Well the native is this. 5th parameter is speed. Just change the speed of its movement. Just lower it down to make it smoother.
pawn Код:
native MoveDynamicObject(objectid, Float: x, Float: y, Float: z, Float: speed, Float:rx = -1000.0, Float:ry = -1000.0, Float:rz = -1000.0);
Reply
#3

Quote:
Originally Posted by Birdkid1999
Посмотреть сообщение
Hello, I am trying to figure out how to use Smooth Rotation, my script currently uses MoveDynamicObject to move gates, gates are a dynamic system in game.. Should I switch it to MoveObject? Help is appriciated
You cannot use 'MoveDynamicObject' in the object created with 'CreateObject'. If it wants to move an Object or does changes in him, it must do it with the functions with which it created them...

If it wants to rotate objects from an object created with
'CreateObject', use this:

pawn Код:
stock RotateObject(objectid, Float:rX, Float:rY, Float:rZ)
{
    if(IsValidObject(objectid))
    {
        new Float:Pos[3];
        GetObjectPos(objectid, Pos[0], Pos[1], Pos[2]);
        CreateObject(objectid, Pos[0], Pos[1], Pos[2], rX, rY, rZ, 300.0);
    }
}

Though the streamer makes it easier.

Sorry if I explained badly, I do not understand very much the English.

Regards.
Reply
#4

I ended up getting this working! Basically, you have to set the gate / object to move up just a bit when it rotates... This can be done by simply increasing the z movement coord from 13.1 to 13.3. Then you just slow the speed down to something like 0.005.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)