-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Description
Bevy version
Operating system & version
Arch Linux
What you did
- Create an entity using just
spawn
, i.e., withoutTransform
andGlobalTransform
components. - Add a child using
spawn_bundle
andPbrBundle
, setting the mesh, material, and transform fields (use..Default::default()
for the other fields)
What you expected to happen
Since the parent entity didn't have either a Transform
or a GlobalTransform
component, I would expect that the transform component in the child entity would be relative to the reference frame. If this had been the case, the transform_propagate_system
should have set the GlobalTransform
component according to the Transform
component and the mesh should have been rendered at the offset provided in the PbrBundle
.
What actually happened
The mesh renders at the origin (i.e., the transform field from the PbrBundle
appears to have been ignored).
Additional information
From the query in the transform_propagate_system
, it appears that this system does not handle the case where the parent entity doesn't have a GlobalTransform
/Transform
component, but it's children do. Is this behavior intentional?