Godot Version
4.2.1
Question
I’m working on a fps p2p shooter game. I have an animation tree that changes the animation that plays for the character model depending on what gun model they are holding. I’m trying to sync the animations so if a player changes weapons their 3d model animates accordingly from the other players perspectives.
I’ve tried the below code which changes the animations of the other characters rather than the one that’s changing weapons. If i change the rpc to “call_remote” nothing happens. I’ve added “any_peer” but can’t work out the correct call to make.
any help would be appreciated!
func _on_weapon_manager_weapon_changed():
update_animations.rpc()
@rpc("call_local")
func update_animations():
animation_tree.get_tree_root().get_node("Idle").get_node("idle_animation").animation = weaponManager.currentWeapon.WeaponName + "_idle"