Posts: 1,779
Threads: 126
Joined: Oct 2010
I got to rotate, but do not think it's an efficient way (see code below) here I show you a video of what I want to accomplish. You can see how at times the object have bad rotations, will understand when you see the code.
http://www.llewellyn.com/blog/wp-con...7/Pendulum.jpg
[ame="http://www.youtube.com/watch?v=BSvaQl4nkec"]http://www.youtube.com/watch?v=BSvaQl4nkec[/ame]
Rotation update code:
http://pastebin.com/0bbGMf3i
All code:
http://pastebin.com/3DbS763v
Posts: 1,779
Threads: 126
Joined: Oct 2010
Posts: 4,885
Threads: 57
Joined: Jun 2012
Reputation:
0
That is because the position of the objects for the client is not the same for the server. When you SetObjectPos() this is snapping the object for the client to the expected position but you absolutely need to use SetObjectPos() for sync purposes.
Posts: 1,779
Threads: 126
Joined: Oct 2010
Quote:
Originally Posted by Pottus
That is because the position of the objects for the client is not the same for the server. When you SetObjectPos() this is snapping the object for the client to the expected position but you absolutely need to use SetObjectPos() for sync purposes.
|
That's not the problem, the problem is in the object rotation, see:
Код:
SetObjectRot(MOVEBASE, -angle, 0.0, 0.0); //Pendulum angle
EDIT_OBJECT_RotateZ(MOVEBASE, RZ); //This is for rotateZ bob, function from UniversalObjectEditor by Stylock
I want rotate object like this
but not by the method previously shown, because first set angle rotationX of the pendulum and after rotate rotation Z with a function by stylock, it will look bad.
Posts: 1,779
Threads: 126
Joined: Oct 2010
Posts: 1,779
Threads: 126
Joined: Oct 2010
Quote:
Originally Posted by codectile
Try using
Код:
SetTimer("Update", 30, 1);
|
That's not the problem