MoveObject Rotation Bug?
#1

Hii,

When i am trying to rotate a door with MoveObject nothing happens. But when i alt+tab and come back in game its rotated.
Code:
pawn Код:
new Float:x,Float:y,Float:z;
new Float:rx,Float:ry,Float:rz;
GetObjectPos(Door,x,y,z);
GetObjectRot(Door,rx,ry,rz);
MoveObject(DoorObject[0], x,y,z+0.0001, 0.0001, 0.0, 0.0, rz-90.0);
Can anyone confirm this?

Admigo

EDIT: Also noticed at SetObjectRot();
Reply
#2

When it calculate moving time, it ignore rotation, so you should add 0.1 to X , so when they opens they moves back abit, which is less noticeable as moving upwards, and slowest moving speed is 0.1 from what I know.

and it rotate instantly at alttab, because eventually game will rotate it, just it cant display it.
In other words your object is moving with a speed of light, as it have to travel 0.0001 coords in 1/1000 of a second.
Reply
#3

Quote:
Originally Posted by ikey07
Посмотреть сообщение
When it calculate moving time, it ignore rotation, so you should add 0.1 to X , so when they opens they moves back abit, which is less noticeable as moving upwards, and slowest moving speed is 0.1 from what I know.

and it rotate instantly at alttab, because eventually game will rotate it, just it cant display it.
In other words your object is moving with a speed of light, as it have to travel 0.0001 coords in 1/1000 of a second.
I tested my other script with barriers and those barriers rotating fine.
Reply
#4

try to use

printf("Speed: %d",MoveObject(DoorObject[0], x,y,z+0.0001, 0.0001, 0.0, 0.0, rz-90.0));

to see what time does it shows.
Reply
#5

Quote:
Originally Posted by ikey07
Посмотреть сообщение
try to use

printf("Speed: %d",MoveObject(DoorObject[0], x,y,z+0.0001, 0.0001, 0.0, 0.0, rz-90.0));

to see what time does it shows.
Its returning
Код:
Speed: 34728953
I alt-tabbed and it was rotated. When i use the command after the alt+tab its rotating fine.
Reply
#6

I loaded "safe_animated" (a new filterscript in 0.3.7) and used it to test MoveObject()... seems to work fine on my PC.
Reply
#7

Quote:
Originally Posted by Matite
Посмотреть сообщение
I loaded "safe_animated" (a new filterscript in 0.3.7) and used it to test MoveObject()... seems to work fine on my PC.
[ame]www.youtube.com/watch?v=w2jeEHEXEM0[/ame]

If you can see its not rotating if i press F before the Alt-Tab. After the Alt-Tab the door is fully rotated. Then when i pressed F its rotating fine.
Reply
#8

Quote:
Originally Posted by Matite
Посмотреть сообщение
I loaded "safe_animated" (a new filterscript in 0.3.7) and used it to test MoveObject()... seems to work fine on my PC.
"safe_animated" on my PC only appears open or closed after i do ALT+TAB if i dont do that the object dont haves movement for me.
Reply
#9

Safe_animated filterscript doesn't work for me either. Safe object doesn't move and I haven't tried to ALT+TAB my game.
Reply
#10

Quote:
Originally Posted by dominik523
Посмотреть сообщение
Safe_animated filterscript doesn't work for me either. Safe object doesn't move and I haven't tried to ALT+TAB my game.
You should try the ALT+TAB method. See if its rotating after it. I hope they will fix this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)