Hi,
I've been playing around with the revised networking concept in godot 4, unfortunately with 0 success.
I've created the server and client in separate projects and I was using WebSocketMultiplayerPeer.
No matter how hard I try, I can't make the RPC calls working and received by the peers.
I've created this simple method to test it:
Server side code (in PlayerCommand.gd) (under path: Server/RPC/PlayerCommand):
@rpc
func move_player():
pass # Implemented on client side
Client side code (in PlayerCommand.gd) (under path: Server/RPC/PlayerCommand):
@rpc
func move_player():
print("MOVING") # Must be called.. Why isn't it happening?
Called from server side (in Server.gd):
$PlayerCommand.move_player.rpc()
The server and client code does not contain any magical things, just setting up a connection, listening for connecting peers, setting up the mulitplayer_peer and calling the network.poll in process, as usual.
- The connection establishes successfully between the server and client, I can connect multiple peers
- The node paths are exactly the same
- The multiplayer peer has been set up correctly
I can't even see outgoing request on the network profiler tab. What am I missing?
Every suggestion would be appreciated.