phantom-camera icon indicating copy to clipboard operation
phantom-camera copied to clipboard

How do I use PhantomCamera with Godot multiplayer?

Open warsang opened this issue 10 months ago • 1 comments

Issue description

Hi!

I've been working on using Phantom camera in https://github.com/warsang/Godot-multiplayer ( not mine; forked from https://github.com/thegatesbrowser/godot-multiplayer ).

On my first player/client, the plugin works great. However, on my second client, I don't see a PhantomCameraHost being spawned (I'm guessing that's because there should only be one PhantomCameraHost per scene and therefore, the second one gets removed automatically?). It seems like the second PhantomCameraHost thinks it's in the same scene as the first player? Below is a screenshot of the remote node view with both players/clients spawned and one having a PhantomCameraHost vs the other not having a PhantomCameraHost . I used the same Player scene to spawn both

image

I'm guessing this isn't a bug and I'm just using this wrong for multiplayer set-ups (This is not a P2P multiplayer set-up but a server multiplayer set-up)? Can you provide indications as to how I should go about using PhantomCamera for a multiplayer set-up (or maybe this is just something not supported by the plugin right now and I should be implementing my own Camera controller).

Steps to reproduce

Clone the repo, open project and launch 1 server and two clients. Observe that first client has the PhantomCameraHost node while the other doesn't

(Optional) Minimal reproduction project

No response

warsang avatar Apr 04 '24 22:04 warsang

This isn't a bug, but rather a current limitation. Basically, only one PCamHost can exist in a scene at the time. Whenever a second is instantiated, it will automatically be removed from the scene. All the nodes you have there are still part of the same main scene (Root), even though they're nested inside the character sub-scenes.

This is meant to be resolved in #26 in v0.8

ramokz avatar Apr 07 '24 09:04 ramokz

Hellooo :) Just checking when this could be expected to be fixed ? :)

GuillaumePoly avatar Oct 06 '24 14:10 GuillaumePoly

The feature was pushed to v0.9 back in May, as more urgent things had been cropping up since.

v0.8 is currently in beta, so am expecting it to be released in a matter of weeks once some kinks have been ironed out. v0.9 work, including this feature, should be started shortly thereafter. Can't say how long it will take until I start looking at it, but most of the groundwork has already been set up in preperation for it.

ramokz avatar Oct 06 '24 20:10 ramokz