1 Quaternion targetRotation = Quaternion.LookRotation(destPos - transform.position); 2 transform.rotation = Quaternion.Slerp(transform.rotation,targetRotation,Time.deltaTime*curRotSpeed);
时间: 2024-10-06 05:30:45
1 Quaternion targetRotation = Quaternion.LookRotation(destPos - transform.position); 2 transform.rotation = Quaternion.Slerp(transform.rotation,targetRotation,Time.deltaTime*curRotSpeed);