From 28e1d81aeb2fd20b435410d7a8c340a11e7f92a0 Mon Sep 17 00:00:00 2001 From: spatialfree Date: Sat, 7 Dec 2024 18:03:09 -0500 Subject: [PATCH] init grab position --- src/Data.cs | 4 ++-- src/Dofs.cs | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Data.cs b/src/Data.cs index 892ef1f..f0e57b5 100644 --- a/src/Data.cs +++ b/src/Data.cs @@ -15,9 +15,9 @@ public class Grab private Quat ori_offset; private Hand? held_by; - public Grab() + public Grab(float x, float y, float z) { - pose = new Pose(); + pose = new Pose(x, y, z); pos_offset = Vec3.Zero; ori_offset = Quat.Identity; held_by = null; diff --git a/src/Dofs.cs b/src/Dofs.cs index 76db3ea..19273a3 100644 --- a/src/Dofs.cs +++ b/src/Dofs.cs @@ -1,3 +1,4 @@ +using System; using StereoKit; namespace dofdemo; @@ -13,8 +14,8 @@ static class Stretch public static void Init() { - to_grab = new(); - from_grab = new(); + to_grab = new(-0.3f, 0, 0); + from_grab = new(-0.3f, 0, 0.1f); } public static void Frame() @@ -42,7 +43,7 @@ static class ColorCube public static void Init() { - grab = new(); + grab = new(0, 0, 0); } public static void Frame()