hi guys.. i have two characters that look each other. i use look_at(enemy.global_position) or self.rotate((enemy.global_position - self.global_position()).angle()) in fixed_process function and they work just fine in offline mode, but in multiplayer, rotation property does not seem to be sent right (because in offline mode there is no weird movements). i use this code for sending the data: rpc_unreliable("position_motion_rotation", position, motion, rotation) and this function:

slave func position_motion_rotation(p_pos, p_mot, p_rot):
position = p_pos
motion = p_mot
 rotation = p_rot

what am i doing wrong? thank you for your time

No idea? :) when one player move and push other player, everything is ok, but when two players move and push each other they go through each other and the opponent on each screen vibrates when it reach the other player.

Try if something like this work?

slave var slave_motion = {"pos":Vector2(), "rot":0.0} func _physics_process(delta): if is_network_master(): #set your position and rotation position += WHATEVER rotation = WHATEVER else: #update the other's position and rotation position = position.linear_interpolate(slave_motion.pos, 0.05) rotation = lerp(rotation, slave_motion.rot, 0.1)

Im a beginner myself, so im not sure if this will help you. Have you setup who will be the network master?

EDIT: Oh i've read your other comment, thats because they still think they can move trough each other you have to check (pref on the server/host) and check to see if they are colliding and force them to stop if they are

Haha i don't know if this helps you in anyway, maybe this isn't your problem :P

Hi Christoffer... first of all, thank you for replying. actually what you said about master, fixed the problem. i just put position codes in master condition not rotation. but still there is a minor problem ;) when game starts in multiplayer mode, if one player does not move at all (no matter which one, master or client) and other player push the one that does not move, the standing player does not still stand and it moves. but when it is moved with input keys, this problem ends. can you help me with this one? thank you :)

2 years later

Hello I know this is an old thread but I am also making a multiplayer game but I am not sure how to update rotation with rpc. How do I update the rotation in multiplayer?