倍速時のめり込み対応
This commit is contained in:
parent
654f2963e5
commit
27b65ad2f7
|
|
@ -168,7 +168,8 @@ namespace MyGame.Scenes.MiniGame.Scripts
|
|||
currentFallSpeed -= fallAcceleration * Time.deltaTime * currentSpeedMultiply;
|
||||
}
|
||||
|
||||
transform.AddLocalPositionY(currentFallSpeed * Time.deltaTime * currentSpeedMultiply);
|
||||
var newYPos = transform.localPosition.y + currentFallSpeed * Time.deltaTime * currentSpeedMultiply;
|
||||
transform.SetLocalPositionY(Mathf.Max(basePos.y, newYPos));
|
||||
}, () =>
|
||||
{
|
||||
currentFallSpeed = 0f;
|
||||
|
|
|
|||
Loading…
Reference in New Issue