1
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user