Fix sit YAW to be relative to table
This commit is contained in:
parent
4a2f8387c0
commit
86a866ee5d
2 changed files with 4 additions and 1 deletions
|
|
@ -78,6 +78,7 @@
|
||||||
position: tablePos,
|
position: tablePos,
|
||||||
rotation: tableRot,
|
rotation: tableRot,
|
||||||
naturalDimensions: true,
|
naturalDimensions: true,
|
||||||
|
registrationPoint: { x: 0.5, y: 0, z: 0.5 },
|
||||||
userData: JSON.stringify({
|
userData: JSON.stringify({
|
||||||
pokerID: pokerID,
|
pokerID: pokerID,
|
||||||
seatCount: seatCount,
|
seatCount: seatCount,
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function getSeatRotation() {
|
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) {
|
function notify(msg) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue