misc fixes

This commit is contained in:
Nova
2023-03-08 02:03:28 -05:00
parent 1c90ed98cf
commit d5728eeccc
4 changed files with 11 additions and 5 deletions

4
Cargo.lock generated
View File

@@ -2005,9 +2005,9 @@ dependencies = [
[[package]]
name = "stardust-xr-molecules"
version = "0.22.0"
version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5fe2979f1816d21c3d1a88351f92e1a011992b166072a5fbc73221d6d4557a8e"
checksum = "44e840a893484f7c9445dde235090ad9cf829191f2bf2b913b5992cbf52ccbd8"
dependencies = [
"color-rs",
"glam 0.23.0",

View File

@@ -21,7 +21,7 @@ regex = "1.7.1"
resvg = "0.29.0"
rustc-hash = "1.1.0"
stardust-xr-fusion = "0.38.1"
stardust-xr-molecules = "0.22.0"
stardust-xr-molecules = "0.23.2"
tokio = { version = "1.24.1", features = ["full"] }
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
tween = "2.0.0"

View File

@@ -218,7 +218,13 @@ impl Button {
}
impl RootHandler for Button {
fn frame(&mut self, info: FrameInfo) {
self.touch_plane.update();
self.grabbable.update(&info);
if self.grabbable.grab_action().actor_started() {
let _ = self.touch_plane.set_enabled(false);
}
if self.grabbable.grab_action().actor_stopped() {
let _ = self.touch_plane.set_enabled(true);
}
self.touch_plane.update();
}
}

View File

@@ -20,7 +20,7 @@ use std::process::{Command, Stdio};
use tween::{QuartInOut, Tweener};
const MODEL_SCALE: f32 = 0.03;
const ACTIVATION_DISTANCE: f32 = 1.0;
const ACTIVATION_DISTANCE: f32 = 0.5;
fn model_from_icon(parent: &Spatial, icon: &Icon) -> Result<Model> {
return match &icon.icon_type {