I’m trying to push another player character on the network when we collide. The problem is that when I do that, only I can see the character moving.
I use :
controller.Move(vect * Time.fixedDeltaTime);
controller being a CharacterController and vect being set correctly.
I don’t understand since I call the same method to move my own player and it works properly.
function OnSerializeNetworkView(stream : BitStream, info : NetworkMessageInfo) {
send the positions in that
example (in C#):
void OnSerializeNetworkView(stream : BitStream, info : NetworkMessageInfo)
{
Vector3 position = new Vector3(0,0,0);
if (stream.isWriting)
{
position = transform.position;
stream.Serialize(ref position); //javascipt doesn't need ref
}
else
{
stream.Serialize(ref position);
transform.position = position
}
}