Godot Version
Godot 4.4
Question
Hey guys, im very new to multiplayer and im using SteamMultiplayerPeer P2P for my game alongside high-level multiplayer API. So im trying to test things out to learn and im facing a problem.
To begin, im trying to learn how to spawn things and how MultiplayerSpawner works. I want to just press a button to spawn an object Infront of the player (item drop kinda thingy)
What I did is working on the host, but for the client that joins, when I try spawn an object, it spawns but snaps back and disappears plus when the client spawn the object the host cant see it, after a little bit I start getting this error a lot in yellow and the host starts lagging hard for the client.
Error:
ConnectionData::sendPending: Send error! Unreliable, won't retry. EResult 25, refer to Main class in docs.
Here is how i have it set up, not sure what im doing wrong or if this is even right to begin with.
Player Script:
@export var character_model: Node3D
@export var item_drop_scene: PackedScene
@export var items_path: Node3D
func _unhandled_input(event: InputEvent) -> void:
if not is_multiplayer_authority(): return
if Input.is_action_just_pressed("inventory"):
drop_item.rpc()
@rpc("any_peer", "call_local", "reliable")
func drop_item():
if is_multiplayer_authority():
var item_drop = item_drop_scene.instantiate()
var player_direction = character_model.global_transform.basis.z * 2 + Vector3(0, 2, 0)
item_drop.position = global_position + player_direction
items_path.add_child(item_drop, true)
This is also how I have it set up inside player node, obvs theres a lot I didnt show like Camera, etc. Those arent part of the problem.
I do have MultiplayerSynchronizer inside the object im spawning syncing the position of it self on spawn and always replicated.
Any help would literally save me, Ive been on this for days and I cant figure it out, I just want to work on my game and its really demotivating lol ![]()




