This commit is contained in:
CortexCore
2024-03-31 23:31:00 +08:00
parent e179d2eb53
commit b7b89ee71a
641 changed files with 31286 additions and 22134 deletions

View File

@@ -50,6 +50,8 @@ namespace BITKit.Node {
var _dir = target.value.position - transform.position;
if(_dir is {x:0,y:0,z:0}) return;
var direction =Quaternion.LookRotation(Vector3.ProjectOnPlane(_dir ,Vector3.up)) ;
transform.rotation = Quaternion.RotateTowards(transform.rotation,direction,Time.deltaTime*agent.angularSpeed);