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

The nearest Camera #13

Open
padreputativo opened this issue Apr 5, 2024 · 3 comments
Open

The nearest Camera #13

padreputativo opened this issue Apr 5, 2024 · 3 comments

Comments

@padreputativo
Copy link

My game is composed of a bunch of scenes within other scenes (as it should be done in Godot), and my camera is also a scene, so I can never click on it because the main node of the camera scene is not of camera type. It would be interesting for the addon to detect nodes that are scenes and search for cameras wherever you click (optionally) following the node tree inward.

@padreputativo
Copy link
Author

Another way to explain it would be that when opening a scene, the addon scans the nodes looking for camera-type nodes and chooses the first one it finds for the preview. If there are multiple cameras, then you can click on the appropriate camera (following the tree if you click on a node that is not a camera type).

@anthonyec
Copy link
Owner

anthonyec commented Apr 21, 2024

Good suggestion, makes sense! The thing that has prevented me from adding such a feature is that there needs to be a limit on how deep it searches the tree for cameras. It can potentially get computationally expensive.

But that's something that could be configurable, just need to think of a friendly way to expose that option.

For your scenes, how nested are the camera nodes in the tree? Is it usually one level deep (root of the scene), or a few nodes deep?

@padreputativo
Copy link
Author

In my game, the player is an independent scene which in turn has another independent scene that is the camera (each with its own functions), and everything is dynamically added during gameplay. I'll probably add another type of scene in the maps that serves as a camera to focus on a specific "view" (for example, focusing on a control panel in first-person view). This camera-view scene will also have to be its own scene, although in this case I might be able to make the camera the owner node of the scene. Nonetheless, it will still be a separate scene so that it can execute certain actions automatically, adding certain extra functionality to the Camera3D node.

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