diff --git a/scripts/poker-admin-tablet.js b/scripts/poker-admin-tablet.js index 1f00f25..c63a596 100644 --- a/scripts/poker-admin-tablet.js +++ b/scripts/poker-admin-tablet.js @@ -60,7 +60,7 @@ // Place table in front of avatar at floor level // Use only the yaw component of avatar rotation so table sits flat var yaw = Quat.safeEulerAngles(avatarRotation).y; - var tableRot = Quat.fromPitchYawRollDegrees(0, yaw, 0); + var tableRot = Quat.fromPitchYawRollDegrees(0, yaw - 90, 0); // 2.5m in front of avatar, snapped to floor var forward = Vec3.multiplyQbyV(tableRot, { x: 0, y: 0, z: -2.5 }); @@ -97,7 +97,12 @@ // Offsets are in table-local space so no world transform needed for (var i = 0; i < seatCount; i++) { var seat = layout[i]; - var seatRot = Quat.fromPitchYawRollDegrees(0, seat.yaw, 0); + var seatRot = Quat.fromPitchYawRollDegrees(-90, seat.yaw, 0); + var seatOffset = { + x: seat.offset.x, + y: seat.offset.y - 0.13, + z: seat.offset.z + }; Entities.addEntity({ type: "Image", @@ -106,7 +111,7 @@ dimensions: constants.POKER_SEAT_PAD.dimensions, alpha: constants.POKER_SEAT_PAD.alpha, parentID: tableID, - localPosition: seat.offset, + localPosition: seatOffset, localRotation: seatRot, script: "https://wizards.cyou/scripts/poker_sit.js", userData: JSON.stringify({ diff --git a/scripts/poker_constants.js b/scripts/poker_constants.js index f605f72..5d4e4bf 100644 --- a/scripts/poker_constants.js +++ b/scripts/poker_constants.js @@ -23,7 +23,7 @@ module.exports = { // Seat pad entity appearance POKER_SEAT_PAD: { - dimensions: { x: 0.6, y: 0.6, z: 0.01 }, + dimensions: { x: 0.4, y: 0.4, z: 0.01 }, imageURL: "https://wizards.cyou/images/sit.png", alpha: 0.7, },