Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I use PhantomCamera with Godot multiplayer? #244

Open
warsang opened this issue Apr 4, 2024 · 1 comment
Open

How do I use PhantomCamera with Godot multiplayer? #244

warsang opened this issue Apr 4, 2024 · 1 comment

Comments

@warsang
Copy link

warsang commented Apr 4, 2024

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

@ramokz
Copy link
Owner

ramokz commented Apr 7, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants