Skip to content

fix(engine): sort the hero by his sprite foot, no editor frames mid-run - #418

Merged
JumpLink merged 1 commit into
mainfrom
fix/hero-depth
Nov 23, 2026
Merged

JumpLink merged 1 commit into
mainfrom
fix/hero-depth

Conversation

@JumpLink

Copy link
Copy Markdown
Contributor

Cause: after the foot-collider swap actor.height is the 8 px collider, so the depth foot sat 4 px below the hero's centre instead of 16 px. Things north of him drew over him.

Also: scenes built mid-run (teleport) spawned placements with editor cell frames (the yellow squares). They now follow the runtime mode.

Specs: hero foot from sprite height (north behind / south in front), ObjectSpawnSystem frames in editor vs runtime.

After the foot-collider swap the hero's actor height is 8 px, so DepthSortSystem put his foot 4 px below his centre instead of 16 px and things north of him drew over him. applyActorDepth now takes the foot offset; PlayerSystem passes half the sprite height.

A scene built while a run is on (teleport) spawned placements in editor mode and kept the yellow cell frames. ObjectSpawnSystem and spawnPlacement now follow the scene's runtime mode.
@JumpLink
JumpLink merged commit c9596cd into main Nov 23, 2026
2 checks passed
@JumpLink
JumpLink deleted the fix/hero-depth branch November 23, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant