ForesightMiningSoftwareCorporation / bevy_transform_gizmo

A 3d gizmo for transforming entities in Bevy.
Apache License 2.0
162 stars 40 forks source link

Not having a gizmo raycast source causes panic #59

Open tbillington opened 1 year ago

tbillington commented 1 year ago

My app is crashing on this line in bevy_transform_gizmo.

It is due to a GizmoPickSource not existing.

For smaller scale apps, requiring a camera exist with a picking source seems fine. However it's overly restrictive for more complex setups.

I have an empty scene that loads first based on a default state, that loads into a splash screen, then into a main menu, then my test level (which would spawn the camera with the GizmoPickSource).

I was able to temporarily work around this by altering my level from

app.add_systems(
    OnEnter(LEVEL_EDITOR_SCENE),
    (level_editor_setup, mesh_make).chain(),
);

to

app.add_systems(
    Startup,
    (level_editor_setup, mesh_make).chain(),
);

but it's not a long term solution.