Fix table spawn Y to floor level

This commit is contained in:
nak 2026-03-19 04:30:12 +00:00
parent 86a866ee5d
commit c5823c7133

View file

@ -62,11 +62,11 @@
var yaw = Quat.safeEulerAngles(avatarRotation).y;
var tableRot = Quat.fromPitchYawRollDegrees(0, yaw, 0);
// 2.5m in front of avatar, snapped to floor (y: -0.45 relative to avatar)
// 2.5m in front of avatar, snapped to floor
var forward = Vec3.multiplyQbyV(tableRot, { x: 0, y: 0, z: -2.5 });
var tablePos = {
x: avatarPosition.x + forward.x,
y: avatarPosition.y - 0.45,
y: -0.45,
z: avatarPosition.z + forward.z,
};