From 709981ef8d473c61c29e12c159dec6e168b30c1b Mon Sep 17 00:00:00 2001 From: spatialfree Date: Tue, 30 Aug 2022 17:45:10 -0400 Subject: [PATCH] post polish --- app/Greenyard/Mono.cs | 8 ++++---- app/Oriel.cs | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/Greenyard/Mono.cs b/app/Greenyard/Mono.cs index 2d5916c..5f1a621 100644 --- a/app/Greenyard/Mono.cs +++ b/app/Greenyard/Mono.cs @@ -58,9 +58,9 @@ public class Mono { Oriels.Rig rig = Oriels.Mono.inst.rig; Oriels.Oriel oriel = Oriels.Mono.inst.oriel; - angle.x += rig.rCon.device.stick.y * -60f * Time.Elapsedf; - angle.x = PullRequest.Clamp(angle.x, -89, 89); - angle.y += rig.rCon.device.stick.x * -60f * Time.Elapsedf; + // angle.x -= rig.rCon.device.stick.y * 90f * Time.Elapsedf; + // angle.x = PullRequest.Clamp(angle.x, -89, 89); + angle.y -= rig.rCon.device.stick.x * 90f * Time.Elapsedf; Vec3 input = new Vec3( rig.lCon.device.stick.x, @@ -69,7 +69,7 @@ public class Mono { ); if (input.MagnitudeSq > 0.01f) { input = ( - Quat.FromAngles(angle.x, 0, 0).Inverse * + // Quat.FromAngles(angle.x, 0, 0).Inverse * Quat.FromAngles(0, angle.y, 0).Inverse * rig.lCon.ori * oriel.ori.Inverse diff --git a/app/Oriel.cs b/app/Oriel.cs index 73d4cb0..e12106b 100644 --- a/app/Oriel.cs +++ b/app/Oriel.cs @@ -154,7 +154,8 @@ public class Oriel { if (interacting) { if (detectCount == 1) { // Grab (face -> crown *face) - ori = (cursorOri * qOffset.Inverse).Normalized; + Quat newOri = (cursorOri * qOffset.Inverse).Normalized; + ori = Quat.Slerp(ori, newOri, Time.Elapsedf * 9f); // gravity snapping (within 6 degrees) *horizontal // always? *here **tilt = nosnap if (Vec3.Dot(-Vec3.Up, ori * -Vec3.Up) > 0.9998f) {