#How to render gizmos in a 3d camera's screen space?
6 messages · Page 1 of 1 (latest)
which gizmos are you using
gizmos are always world space.
to work around this, render them to a separate render layer by setting it with https://docs.rs/bevy/latest/bevy/prelude/struct.GizmoConfig.html
and then use a extra 2d camera set to thay render layer as well which should allow you to have them on top of everything else. the default 2d camera setup should mean 1 unit world space = 1 pixel screen space, with the origin in the middle (unlike most things where the origin is top-left)
ooooh ok thank you!
oh that's a good workaround
i was going to recommend passing the camera's GlobalTransform (plus clip offset) to the gizmo draw call
Tbh my first instinct would be to apply the cameras transform to the position you want to render them, then the position is camera relative