Quantcast
Channel: Latest Questions by ryno9788
Viewing all articles
Browse latest Browse all 91

Ai rotation on one axis

$
0
0
I am trying to make a script with an AI that looks at you from two axis the parent object will look on an X axis while the child object will look on a Y axis but my other scripts just make the object look on all axis at my object. Can someone show me how I can fix this? var rotate = Quaternion.LookRotation (target.position - transform.position); var LookTarget = Vector3(rotate, 0, 0); transform.rotation = Vector3(Quaternion.Slerp (transform.rotation, rotate, Time.deltaTime * damp), 0, 0); I can't find a way to make it work. error: BCE0024: The type 'UnityEngine.Vector3' does not have a visible constructor that matches the argument list '(UnityEngine.Quaternion, int, int)'.

Viewing all articles
Browse latest Browse all 91

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>