MoveObject speed isn't working properly on second gate -
Riwerry - 08.09.2015
Hello, so I have two different gates, which are opening by command, the first one opens fine, smoothly up, but second one just instantly jumps up, but I have same speed like on the provious gate, code:
pawn Код:
gate1 = CreateObject(968, -2671.83545, 1280.14734, 55.33680, 0.00000, 90.00000, 0.00000);
MoveObject(gate1, -2671.84326, 1280.12891, 55.33680, 0.017, 0.00000, 0.00000, 0.00000); //Opens smoothly
gate2 = CreateObject(968, -2648.71094, 1341.87781, 7.09800, 0.00000, 90.00000, 89.00000);
MoveObject(gate2, -2648.71094, 1341.87781, 7.09800, 0.017, 0.00000, 0.00000, 89.00000); //Jumps up
Re: MoveObject speed isn't working properly on second gate -
IceBilizard - 08.09.2015
pawn Код:
gate1 = CreateObject(968, -2671.83545, 1280.14734, 55.33680, 0.00000, 90.00000, 0.00000);
MoveObject(gate1, -2671.84326, 1280.12891, 55.33680, 1.2, 0.00000, 0.00000, 0.00000); //Opens smoothly
gate2 = CreateObject(968, -2648.71094, 1341.87781, 7.09800, 0.00000, 90.00000, 89.00000);
MoveObject(gate2, -2648.71094, 1341.87781, 7.09800, 1.2, 0.00000, 0.00000, 89.00000); //Jumps up
Re: MoveObject speed isn't working properly on second gate -
Riwerry - 09.09.2015
Quote:
Originally Posted by IceBilizard
pawn Код:
gate1 = CreateObject(968, -2671.83545, 1280.14734, 55.33680, 0.00000, 90.00000, 0.00000); MoveObject(gate1, -2671.84326, 1280.12891, 55.33680, 1.2, 0.00000, 0.00000, 0.00000); //Opens smoothly
gate2 = CreateObject(968, -2648.71094, 1341.87781, 7.09800, 0.00000, 90.00000, 89.00000); MoveObject(gate2, -2648.71094, 1341.87781, 7.09800, 1.2, 0.00000, 0.00000, 89.00000); //Jumps up
|
Didn't work, still same issue.
Re: MoveObject speed isn't working properly on second gate -
IceBilizard - 09.09.2015
Quote:
Originally Posted by Riwerry
Didn't work, still same issue.
|
increase the speed of gates its 1.2 so increase to 2.0 on which gate you want
Re: MoveObject speed isn't working properly on second gate -
Threshold - 10.09.2015
Read this page:
https://sampwiki.blast.hk/wiki/MoveObject
You will find this:
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.
|
You must actually 'move' the object in terms of X, Y or Z if you want a smooth rotation. For this example, we'll just add 0.00001 to the 'Z' coordinate.
pawn Код:
gate1 = CreateObject(968, -2671.83545, 1280.14734, 55.33680, 0.00000, 90.00000, 0.00000);
MoveObject(gate1, -2671.83545, 1280.14734, 55.33681, 0.017, 0.00000, 0.00000, 0.00000);
gate2 = CreateObject(968, -2648.71094, 1341.87781, 7.09800, 0.00000, 90.00000, 90.00000);
MoveObject(gate2, -2648.71094, 1341.87781, 7.09801, 0.017, 0.00000, 0.00000, 90.00000);
It's not that the speed of MoveObject is incorrect, it's just that without any actual 'movement', the object will just jump into a rotation.