Fix seat pad height
This commit is contained in:
parent
d052c897e6
commit
c259168f6f
2 changed files with 9 additions and 4 deletions
|
|
@ -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({
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue