Quantcast
Channel: Latest Questions by stockhouse50
Viewing all articles
Browse latest Browse all 4

2d - Follow cursor by having object rotate around z-axis

$
0
0
Using the overhead view how can I move the mouse cursor around the screen while having the object rotate around the z-axis so the object faces the mouse cursor. I thought something like the code below would work but apparently not. transform.LookAt (new Vector3 (Input.mousePosition.x, Input.mousePosition.y, 0)); I know very little so if you could explain your code that would be very helpful. Thanks!

Viewing all articles
Browse latest Browse all 4

Trending Articles



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