Changing player position on server and client simaltaneously
by Ali Khan · in Torque Game Engine · 02/14/2007 (5:48 am) · 1 replies
HI,
I am trying to attach a player to a moving object. I do not wish to mount the player on the moving object, since I need to move around inside the moving object freely.
So the problem I am having is that if I change the player position as the moving object changes position, I get jitters on the client side. I am updating the player position on both the client and the server side.
I am also moving other static objects with this moving object and all of them are moving smoothly.
Now when I do this same thing with the player, who is not moving himself I get the jitters. When I dug deep into the problem I find out that the client side prediction code kicks in when I change the player position on the client. Although I am not moving the player myself.
So basically I want to set the transform of the player on the server and client sides simaltaneously without jitters. Can anybody help me ?
Ali Khan.
I am trying to attach a player to a moving object. I do not wish to mount the player on the moving object, since I need to move around inside the moving object freely.
So the problem I am having is that if I change the player position as the moving object changes position, I get jitters on the client side. I am updating the player position on both the client and the server side.
I am also moving other static objects with this moving object and all of them are moving smoothly.
Now when I do this same thing with the player, who is not moving himself I get the jitters. When I dug deep into the problem I find out that the client side prediction code kicks in when I change the player position on the client. Although I am not moving the player myself.
So basically I want to set the transform of the player on the server and client sides simaltaneously without jitters. Can anybody help me ?
Ali Khan.
Torque Owner Ali Khan
the player setTransform function has a comment
// This method should never be called on the client.
Does this mean setting the player transform on the client side is not allowed.
But I need to do this for smooth movement. Otherwide I get jerky movement as the player prediction code only works for the movement done by the player. If you set the position explicitly, (like me) you would not get that predicted (you can't predict it !!).
This is worse than I thought.