post polish

This commit is contained in:
spatialfree 2022-08-30 17:45:10 -04:00
parent 9a72001c17
commit 709981ef8d
2 changed files with 6 additions and 5 deletions

View file

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

View file

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