bevy_editor_pls
bevy_editor_pls copied to clipboard
Gizmo rendering location incorrect
Gizmo rendering on parent objects seems fine; however, gizmo placement on child objects seems off.
How to reproduce, run the load_gltf example in this repo, and specify a different translation for the scene when spawned, something like:
commands.spawn(SceneBundle {
scene: asset_server.load("models/FlightHelmet/FlightHelmet.gltf#Scene0"),
transform: Transform {
translation: Vec3::new(5.0, 0.0, 5.0),
..default()
},
..default()
});
Nothing crazy here, we are just spawning an entity and giving it a different starting location. What you end up with is everything rendering correctly for the gltf; however, the gizmos for children of the scene are all pinned to the world origin. Interestingly, the global transform of the children appear to be correct, so there is a mismatch between where the gizmo is rendered and what the actual global+local transform of the object is.