bevy_editor_pls icon indicating copy to clipboard operation
bevy_editor_pls copied to clipboard

Gizmo rendering location incorrect

Open thedodd opened this issue 2 years ago • 0 comments

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.

Screenshot 2023-07-15 at 13 12 43 Screenshot 2023-07-15 at 13 12 53 Screenshot 2023-07-15 at 13 14 00

thedodd avatar Jul 15 '23 18:07 thedodd