fix: sync reversed log collision offset
This commit is contained in:
parent
b857ae5f2b
commit
597486afcb
@ -422,7 +422,10 @@ class ForestScene extends Phaser.Scene {
|
|||||||
.setDepth(6);
|
.setDepth(6);
|
||||||
|
|
||||||
const surfaceWidth = (LOG_SURFACE_RIGHT - LOG_SURFACE_LEFT) * scale;
|
const surfaceWidth = (LOG_SURFACE_RIGHT - LOG_SURFACE_LEFT) * scale;
|
||||||
const surfaceCenterOffset = (
|
// The visible moss cap is biased left relative to the cropped log frame.
|
||||||
|
// Keep the corrected surface width, but mirror the centre correction so
|
||||||
|
// the collider follows the artwork rather than drifting right.
|
||||||
|
const surfaceCenterOffset = -(
|
||||||
((LOG_SURFACE_LEFT + LOG_SURFACE_RIGHT) / 2) - (LOG_FRAME_WIDTH / 2)
|
((LOG_SURFACE_LEFT + LOG_SURFACE_RIGHT) / 2) - (LOG_FRAME_WIDTH / 2)
|
||||||
) * scale;
|
) * scale;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user