From 0b76667fd5332109236a72df0b25bb08992d91bb Mon Sep 17 00:00:00 2001 From: MayaTheShy Date: Sat, 8 Nov 2025 21:15:20 -0500 Subject: [PATCH] fix: update sphere transform creation to use Vector3 and Quaternion for translation and rotation --- bridge/src/lib.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bridge/src/lib.rs b/bridge/src/lib.rs index a1af1f1..50bb7ce 100644 --- a/bridge/src/lib.rs +++ b/bridge/src/lib.rs @@ -199,9 +199,12 @@ impl Reify for BridgeState { }, 2 => { // Sphere entity - use tex_cube with uniform scale to approximate + use stardust_xr_fusion::values::{Vector3, Quaternion}; let avg_scale = (vis_scale.x + vis_scale.y + vis_scale.z) / 3.0; - let uniform_scale = glam::Vec3::splat(avg_scale); - let sphere_transform = Transform::from_translation_rotation_scale(trans, rot, uniform_scale); + let translation_vec = Vector3 { x: trans.x, y: trans.y, z: trans.z }; + let rotation_quat = Quaternion { x: rot.x, y: rot.y, z: rot.z, w: rot.w }; + let uniform_scale_vec = Vector3 { x: avg_scale, y: avg_scale, z: avg_scale }; + let sphere_transform = Transform::from_translation_rotation_scale(translation_vec, rotation_quat, uniform_scale_vec); Some(( *id, ModelWrapper::builtin("tex_cube", sphere_transform, node_color).build()