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

Decouple Planets from Parent Star #37

Closed
thombruce opened this issue Oct 6, 2023 · 1 comment · Fixed by #38
Closed

Decouple Planets from Parent Star #37

thombruce opened this issue Oct 6, 2023 · 1 comment · Fixed by #38
Milestone

Comments

@thombruce
Copy link
Owner

The problem:

Now that I have indicators, I tried increasing the radius of the orbit for my planet. When I got to it, no planet was visible.

Why?

I suspect this is happening due to this:

If you hide an entity that has children, they will also be hidden, regardless of what their individual Visibility value is set to.

Source: https://bevy-cheatbook.github.io/features/visibility.html

But wait...

I've just tried setting NoFrustumCulling on the parent star and... it hasn't rescued the planet. It's still not showing. How sure am I that this is a parent-child issue? Not very. Surely if the parent visibility isn't culled... the child should be visible?

Checking Something...

Nope, with NoFrustumCulling added to the child as well, it still doesn't show... weird.

I believe that parent visibility is the key issue here, and that the planet does not show because the computed visibility of the star is true at a given distance with or without NoFrustumCulling.

Recommendation:

Decouple the planet from the parent star and experiment again to confirm or refute the above.

@thombruce thombruce mentioned this issue Oct 6, 2023
5 tasks
@thombruce thombruce added this to the v0.1.0 milestone Oct 6, 2023
@thombruce thombruce mentioned this issue Oct 6, 2023
@thombruce
Copy link
Owner Author

Planet has been decoupled from the star in some recent work (not yet committed).

The indicator now appears correct. And as a bonus, the planet scaling is decoupled from the star scaling (so I can remove some adjustments I had been making).

I think two things were happening:

  1. The planet was being culled from view along with the star (but even when I removed culling from the star, I still couldn't find it because...)
  2. The indicator was pointing to where the planet would have been if not for the scaling factor tweaks (meaning the indicator was pointing at the halfway point between star and planet, rather than the planet itself)

@thombruce thombruce mentioned this issue Oct 6, 2023
5 tasks
@thombruce thombruce added this to Verse Nov 6, 2023
@thombruce thombruce moved this to Done in Verse Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant