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

Handling phantomCamerahosts with swapping character scenes #219

Open
swapmasterx opened this issue Feb 15, 2024 · 1 comment
Open

Handling phantomCamerahosts with swapping character scenes #219

swapmasterx opened this issue Feb 15, 2024 · 1 comment

Comments

@swapmasterx
Copy link

swapmasterx commented Feb 15, 2024

Issue description

While its not currently an issue with multiplayer implementation where changing character controllers (changing from playable character to spectator character on death) causes the "Only one PhantomCameraHost can exist in a scene
Multiple PhantomCameraHosts will be supported in #26" error to occur. While I did see the links contents I'm wondering if there is a work around for switching character controllers while not encountering this issue while waiting for that update the time being. (since only one cam controller should be active anyhow.)

Steps to reproduce

  • Use Untrue plugin
  • Slot working character with controls and camera built in
  • use Game.get_gamemode().player_character_scene = [call to spectator scene] to swap character controller with different one via a trigger (in this case when player hp reaches 0)
  • Error occurs. WASD and jumping still works but camera becomes a fixed pov. Moving the mouse still causes input direction to change like you can still look around however

(Optional) Minimal reproduction project

I'm new to coding so I'm not sure what I can pull out and the issue will still be replicable. If you can't replicate the error above though I can upload the full project on request.

@ramokz
Copy link
Owner

ramokz commented Feb 16, 2024

Think the solution you're looking for depends on how you've set up your scene.

You mention multiplayer, and to paraphrase what you've said just to make sure I understand it correctly, is your goal to you switch between 2 cameras. One for when the player is alive to another upon reaching 0 hp?

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