update mutiplay

This commit is contained in:
2026-04-08 12:38:39 +07:00
parent e6deb358df
commit 8ef5ecbe0f
10 changed files with 138 additions and 180 deletions

View File

@@ -53,18 +53,9 @@ namespace OnlyScove.Scripts
}
velocity.y = stateMachine.VelocityY;
// DÙNG HÀM MOVE TẬP TRUNG ĐỂ ĐỒNG BỘ TỐC ĐỘ VỚI MẠNG
// Sử dụng hàm Move tập trung (0.7f là giá trị Speed cho Animator khi đi bộ)
stateMachine.Move(velocity, 0.7f, deltaTime);
if (moveDirection != Vector3.zero)
{
Quaternion targetRot = Quaternion.LookRotation(moveDirection);
stateMachine.transform.rotation = Quaternion.RotateTowards(
stateMachine.transform.rotation,
targetRot,
stateMachine.RotationSpeed * deltaTime
);
}
stateMachine.Rotate(moveDirection, deltaTime);
}
public override void PhysicsTick(float fixedDeltaTime) {}