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

Inconsistent detection of PhantomCameraHost #267

Open
tiloc opened this issue Apr 28, 2024 · 3 comments
Open

Inconsistent detection of PhantomCameraHost #267

tiloc opened this issue Apr 28, 2024 · 3 comments
Labels
2D Issues concerning 2D scenes 3D Issues concerning 3D scenes enhancement New feature or request phantom camera host Related to PhantomCameraHost nodes
Milestone

Comments

@tiloc
Copy link

tiloc commented Apr 28, 2024

Issue description

I have a scene setup as in this screenshot:
image

In the bottom dock, the Phantom Host tab is telling me that it cannot show a preview, because there is no PhantomCameraHost in the scene. But when I hit the button to add one, I get an error printed to the console that there already is one.

  Only one PhantomCameraHost can exist in a scene
  Multiple PhantomCameraHosts will be supported in https://github.com/MarcusSkov/phantom-camera/issues/26

Steps to reproduce

See Issue description

(Optional) Minimal reproduction project

No response

@ramokz
Copy link
Owner

ramokz commented Apr 28, 2024

My best guess is that it's because you have multiple Camera3D nodes in your scene tree. Since the addon was designed to avoid precisely that, it only looks at the first Camera3D instance. Not that it should necessarily be like that, given what the error also says about there being an option to have multiple hosts in the future. Suspect it might also be partially resolved in 7.1 with the introduction of PhantomCameraManager singleton.

The simplest solution that I can think of right now would be to move the Camera3D, with the PCamHost, to the top of the scene tree so that is the one being read first.

@tiloc
Copy link
Author

tiloc commented Apr 30, 2024

I am currently looking into using Phantom Camera for 3rd person following, and in the near future group following. I think your algorithms for that are more sophisticated than what I want to code myself. For other situations in the same scene I want the artistic freedom of the pure Godot Camera3D, especially DOF blurring.

I understand the general limitation of only having one PCamHost in the current version. I mainly opened the issue because of the seeming inconsistency between 2 algorithms that determine how many PCamHosts there are in the scene? Maybe there is an opportunity to consolidate this into one?

@ramokz
Copy link
Owner

ramokz commented Apr 30, 2024

Do think there's a way to support your setup, but think it'll be a bit of a pain to get it to detect it correctly with the way the addon is currently structured.

The changes coming with #126 should make that much easier to handle, as it will introduce a PhantomCameraManager singleton, which contains a reference to the Host node. I am not too keen on doing a more complicated fix before that, as it will be effectively somewhat wasted work following that release.

Worth mentioning that the remaining Camera3D property values and environment resources, such as support for DOF, will be added in #127 and #218. Should hopefully remove the need for having other Camera3D in a scene.

@ramokz ramokz added enhancement New feature or request phantom camera host Related to PhantomCameraHost nodes 3D Issues concerning 3D scenes 2D Issues concerning 2D scenes labels May 6, 2024
@ramokz ramokz added this to the 0.7.2 milestone May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2D Issues concerning 2D scenes 3D Issues concerning 3D scenes enhancement New feature or request phantom camera host Related to PhantomCameraHost nodes
Projects
Status: Done
Development

No branches or pull requests

2 participants