I've set up an animation player and an animation tree for the player, along with the movement script. I was wondering how to make those animations work over the network? Here's a snippet of the code
func physicsprocess(delta):
if gettree().hasnetwork_peer():
if is_network_master():
var input_vector = Vector2.ZERO
input_vector.x = Input.get_action_strength("ui_right") - Input.get_action_strength("ui_left")
input_vector.y = Input.get_action_strength("ui_down") - Input.get_action_strength("ui_up")
input_vector = cartesian_to_isometric(input_vector).normalized()
if input_vector != Vector2.ZERO:
velocity = input_vector
velocity = velocity.move_toward(input_vector * MAX_SPEED, ACCELERATION)
else:
velocity = velocity.move_toward(Vector2.ZERO, FRICTION)
move_and_slide(velocity)