fix(camping): swap tent panel L/R to render apex /\ not \/
All checks were successful
Deploy Addons / deploy (push) Successful in 23s
All checks were successful
Deploy Addons / deploy (push) Successful in 23s
Bedrock mirrors the panel geometry across the block's local X axis relative to the .geo.json, so the player's column needs panel_r and the adjacent column needs panel_l for the roof seam to peak correctly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -167,8 +167,9 @@ function tryPlaceTent(player) {
|
|||||||
|
|
||||||
// A-frame layout: 3 long × 2 wide, single block tall. Each cross-section is a
|
// A-frame layout: 3 long × 2 wide, single block tall. Each cross-section is a
|
||||||
// pair of slope panels meeting at the apex on the seam between the two columns.
|
// pair of slope panels meeting at the apex on the seam between the two columns.
|
||||||
// w=0 is the player's column → LEFT side of the tent (panel_l).
|
// Bedrock renders the panel geometry mirrored across the block's local X axis
|
||||||
// w=1 is one step right → RIGHT side of the tent (panel_r).
|
// relative to a literal read of the .geo.json, so panel_r goes in the player's
|
||||||
|
// column and panel_l goes one step right to land /\ instead of \/.
|
||||||
const blockFacing = blockFacingFor(facing);
|
const blockFacing = blockFacingFor(facing);
|
||||||
const canvasCells = [];
|
const canvasCells = [];
|
||||||
for (let l = 0; l < 3; l++) {
|
for (let l = 0; l < 3; l++) {
|
||||||
@@ -176,13 +177,13 @@ function tryPlaceTent(player) {
|
|||||||
x: ox + l * fx,
|
x: ox + l * fx,
|
||||||
y: oy,
|
y: oy,
|
||||||
z: oz + l * fz,
|
z: oz + l * fz,
|
||||||
block: TENT_PANEL_L,
|
block: TENT_PANEL_R,
|
||||||
});
|
});
|
||||||
canvasCells.push({
|
canvasCells.push({
|
||||||
x: ox + l * fx + rx,
|
x: ox + l * fx + rx,
|
||||||
y: oy,
|
y: oy,
|
||||||
z: oz + l * fz + rz,
|
z: oz + l * fz + rz,
|
||||||
block: TENT_PANEL_R,
|
block: TENT_PANEL_L,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user