update mutiplay
This commit is contained in:
@@ -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) {}
|
||||
|
||||
Reference in New Issue
Block a user