Skip to content

Defining behavior in a hierarchy, inherting behavior from parent and making children visible #5880

Answered by wilk10
Caligino asked this question in Q&A
Discussion options

You must be logged in to vote

To fix the formatting I think you need to wrap everything in:
```rust
your code
```

Regarding your question, for the hierarchy to work properly, the parent and all children need to have all components from the SpatialBundle (meaning Transform, GlobalTransform, Visibility, ComputedVisibility). The Camera3dBundle doesn't have Visibility and ComputedVisibility, so you need to add those manually to the entity with that component (together they form the VisibilityBundle, to insert both in one go). I think this should fix it.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Caligino
Comment options

@Sheepyhead
Comment options

@nicopap
Comment options

nicopap Sep 5, 2022
Collaborator

Answer selected by nicopap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants