Object Rotation
#1

Hi, I would like to know how to rotate a gate.

From this position.

pawn Код:
rottest = CreateObject(3049, -340.80, 1534.96, 76.29,   0.00, 0.00, 0.00);//

To this one:

pawn Код:
rottest = CreateObject(3049, -340.80, 1534.96, 76.29,   0.00, 0.00, 90.00);//
I tried this:

pawn Код:
COMMAND:rotarear(playerid, params[])
{
    if (IsPlayerLAdmin(playerid) >= 1)
    {
        MoveObject(rottest, 0, 0, 3+0.0001, 0.0001, 0.0, 0.0, 180.0);
        SendClientMessage(playerid,-1,"rotation sucessfull");
    }
    else SendClientMessage(playerid, -1, "SERVER: Unknown Command.");
    return 1;
}
Reply
#2

pawn Код:
MoveObject(rottest, -340.801, 1534.96, 76.29, 2, 0, 0, 90);
Reply
#3

I've already tested that, it just CHANGES the rotation of the object. It doesn't slowly rotate.
Reply
#4

The rotation parameters are the FINAL rotation, after MOVEMENT, which means you have to MOVE the object. Move it up/down (ALTERNATIVE) each time by 0.001 and set the speed to about the same (meaning it'll take 1 second) and there you go.

Use my mGates include (see my signature) if you want; it's very helpful.
Reply
#5

Wow, I'll test it.

Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)