Quantcast
Channel: Latest Questions by absameen
Viewing all articles
Browse latest Browse all 62

Constrain LookAt to Local Axis

$
0
0
I've been using the following code to constrain LookAt to a specific axis: Vector3 lookAtPos = target; lookAtPos.y = obj.transform.position.y; // constrain y axis obj.LookAt(lookAtPos); This constrains to the global y axis. What I need to do is constrain to the local y axis that can be viewed with the local rotate handle. How is this possible?

Viewing all articles
Browse latest Browse all 62

Trending Articles



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