Repository navigation
fix(engine): sort the hero by his sprite foot, no editor frames mid-run - #418
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cause: after the foot-collider swap
actor.heightis 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.