openxr: hide watch via transform

This commit is contained in:
galister
2024-02-12 21:25:37 +01:00
parent 08903369da
commit ba9ba876dc
3 changed files with 24 additions and 21 deletions

View File

@@ -744,14 +744,10 @@ enum LeftRight {
Right,
}
pub fn watch_fade<D>(app: &mut AppState, overlays: &mut OverlayContainer<D>)
pub fn watch_fade<D>(app: &mut AppState, watch: &mut OverlayData<D>)
where
D: Default,
{
let watch = overlays
.mut_by_selector(&OverlaySelector::Name(WATCH_NAME.into()))
.unwrap();
if watch.state.spawn_scale < f32::EPSILON {
watch.state.want_visible = false;
return;