CharacterMovement の代わりに、以下のスクリプトをアタッチします。
using System; using MoreMountains.TopDownEngine; using UnityEngine; public class CharacterMovementCustom : CharacterMovement { float secondaryHorizontalInput; float secondaryVerticalInput; protected override void InternalHandleInput() { base.InternalHandleInput(); secondaryHorizontalInput = _inputManager.SecondaryMovement.x; secondaryVerticalInput = _inputManager.SecondaryMovement.y; } protected override void HandleInput() { if (InputAuthorized) { _horizontalMovement = Math.Abs(secondaryHorizontalInput) > Mathf.Epsilon ? secondaryHorizontalInput : _horizontalInput; _verticalMovement = Math.Abs(secondaryVerticalInput) > Mathf.Epsilon ? secondaryVerticalInput : _verticalInput; } else { _horizontalMovement = 0f; _verticalMovement = 0f; } } public override void ResetInput() { base.ResetInput(); secondaryHorizontalInput = 0f; secondaryVerticalInput = 0f; } }