ForesightMiningSoftwareCorporation / bevy_transform_gizmo

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

Transform Gizmos Uninteractable in WebGL #54

Open sajattack opened 1 year ago

sajattack commented 1 year ago

As discussed on discord:

sajattack: Using bevy 0.10.1, bevy_transform_gizmo 0.7 and bevy_mod_picking 0.13, in WebGL, on a nested mesh, I can bring up a transform gizmo but not interact with it. It draws and I click it and nothing reacts. Maybe mouse input is broken on web?

aevyrie: Looks like it even fails with a few simple meshes. Hm. Need to do some debugging.

Repro:

Build this project with trunk-rs https://trunkrs.dev/

bevy-repro.zip

aevyrie commented 1 year ago

Something odd is happening. I looked at this briefly, and I don't see anything obvious. Picking is working, however dragging is not, at least on this mesh. Need to see if other dragging examples (like the one in the picking repo) work as expected.

azazdeaz commented 1 year ago

I can reproduce the issue with bevy_transform_gizmo@0.8.0 and bevy@0.11.2. I tried to figure it out, but i have no clue what's the issue is. It seems like the PickingInteraction component is set to Pressed before the grab_gizmo system runs, but i couldn't find out how that happens. Dragging with bevy_mod_picking works perfectly for me in the browser :+1: