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

Suggestion: make the "Scene Requirement" section more clear in the documentation #3

Open
nanto2016 opened this issue May 18, 2024 · 1 comment

Comments

@nanto2016
Copy link

First of all, there's just a very minor detail: I think the name should be "Scene Requirements" with an S as there multiple requirements, but I'm not 100% sure.

What brought me here in the first place is some confusion I got from the 2D example scene for Tweening. In this scene, there is a PhantomCamera2D as a child of an Area2D, but in the documentation, there it says:

  • At least onePhantomCamera2D/PhantomCamera3D node
    • Without a parent node except for the scene's root.

Here's what I understood from this:

  • There needs to be at least one Pcam
  • Pcams need to be a direct child of the scene's root node

So does this portion of the docs actually mean that you need the Pcam to be a descendant of the scene's root node? If so, I would simply remove the portion that says "Without a parent node...".

And lastly, does the following quote from the docs (in the same section) mean that the Camera2D/Camera3D needs to be a direct child of the root node? From my testing, it in fact does not need to be a direct child of the root node.

  • A Camera2D/Camera3D node
    • Without a parent node except for the scene's root.

If not, I suggest once again removing the last part.

I have never done this before but I will try to make a fork with these changes, plus an extremely minor detail: adding a space where indicated in the following image.

just before PhantomCameraHost and PhantomCamera2D

Thank you a lot for this great addon that I can't wait to use (and the really cool docs that come with it) !

nanto2016 added a commit to nanto2016/phantom-camera-docs that referenced this issue May 18, 2024
As described in the issue I made: ramokz#3
@ramokz
Copy link
Owner

ramokz commented May 19, 2024

The wording “Without a parent node except for the scene's root.” is less of a strict requirement, and more of a general rule of thumb. It was added as I noticed a fair few people had nested PCams inside a parent node that was moving, which caused undesired follow mode behaviour, who then submitted bug reports. Keeping a PCam as a child of the scene root makes it so that issue wouldn't occur, assuming people didn't move the root node itself. But you're right in that it's not strictly true. Like most general rules, you can break them if you know what you're doing. In the Tweening example scene's case, those PCams nor its parent Area2D are meant to move, so in cases like that it doesn't matter whether they're nested or not.

Have been thinking of adding an option to set PCams as a top-level node, which would make the requirement note on the site go away, but that can lead to breaking behaviour, so it's likely for a 0.8 release.

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