walk anim speed adjusted

This commit is contained in:
minjaesong
2022-01-11 22:14:44 +09:00
parent dc595fdd51
commit 03a06773c4
4 changed files with 3 additions and 7 deletions

View File

@@ -709,7 +709,7 @@ open class ActorHumanoid : ActorWithBody, Controllable, Pocketed, Factionable, L
if (this is HasAssembledSprite) {
try {
val baseDelay = animDesc!!.getAnimByFrameName("ANIM_RUN").delay
val moveSpeedMult = (controllerV?.x ?: 0.0).abs().coerceAtLeast(PHYS_EPSILON_VELO).toFloat() / 4f // FIXME empirical value
val moveSpeedMult = (controllerV?.x ?: 0.0).abs().coerceAtLeast(PHYS_EPSILON_VELO).toFloat() / 1.414f // FIXME empirical value
val stride = scale.toFloat()
val maxMoveSpeed = scale.sqrt().toFloat() // ActorWithBody uses scale.sqrt() for determining walk acceleration
val scaleCompensation = stride / maxMoveSpeed