From 86a866ee5d7fdd539722f3fb8ed91862390e7bee Mon Sep 17 00:00:00 2001 From: nak Date: Thu, 19 Mar 2026 03:39:16 +0000 Subject: [PATCH] Fix sit YAW to be relative to table --- scripts/poker-admin-tablet.js | 1 + scripts/poker_sit.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/poker-admin-tablet.js b/scripts/poker-admin-tablet.js index 62438b9..ea82699 100644 --- a/scripts/poker-admin-tablet.js +++ b/scripts/poker-admin-tablet.js @@ -78,6 +78,7 @@ position: tablePos, rotation: tableRot, naturalDimensions: true, + registrationPoint: { x: 0.5, y: 0, z: 0.5 }, userData: JSON.stringify({ pokerID: pokerID, seatCount: seatCount, diff --git a/scripts/poker_sit.js b/scripts/poker_sit.js index d816fa2..6d4bca7 100644 --- a/scripts/poker_sit.js +++ b/scripts/poker_sit.js @@ -47,7 +47,9 @@ } function getSeatRotation() { - return Quat.fromPitchYawRollDegrees(0, _seatData.yaw, 0); + var tableProps = Entities.getEntityProperties(_tableID, ["rotation"]); + var tableYaw = Quat.safeEulerAngles(tableProps.rotation).y; + return Quat.fromPitchYawRollDegrees(0, tableYaw + _seatData.yaw, 0); } function notify(msg) {