fix: scale animation playback rate with entity height (fixes SDK #27)#19
Open
cryptochris8 wants to merge 1 commit intohytopiagg:mainfrom
Open
fix: scale animation playback rate with entity height (fixes SDK #27)#19cryptochris8 wants to merge 1 commit intohytopiagg:mainfrom
cryptochris8 wants to merge 1 commit intohytopiagg:mainfrom
Conversation
…piagg#27) Walking, running, and swimming animation playback rates now scale proportionally with entity.height / BASE_ENTITY_HEIGHT. Previously, animations played at a fixed speed regardless of entity scale, causing a visual mismatch where scaled entities appeared to slide or their legs moved at the wrong speed relative to their movement. The audio step playback rate is also scaled to stay in sync with the visual animation. At the default scale (1.0 / height 1.5), behavior is unchanged since the multiplier equals 1. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
Fixes SDK issue #27 — walking animations breaking at non-default entity scales.
The physics colliders in DefaultPlayerEntityController correctly scale with
entity.height / BASE_ENTITY_HEIGHT, but animation playback rates and audio were hardcoded. This caused a visible mismatch where scaled entities' legs would slide along the ground because the animation played at the wrong speed relative to actual movement.Fix: Multiplies animation playback rate by
entity.height / BASE_ENTITY_HEIGHTfor walk, run, and swim animations. Also scales footstep audio playback rate. At the default scale (height = 1.5), the multiplier is exactly 1.0, so behavior is unchanged.Files changed:
server/src/worlds/entities/controllers/DefaultPlayerEntityController.tsTest plan
🤖 Generated with Claude Code