init grab position

This commit is contained in:
ethan merchant 2024-12-07 18:03:09 -05:00
parent ca4b715130
commit 28e1d81aeb
2 changed files with 6 additions and 5 deletions

View file

@ -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;

View file

@ -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()