2D Toolkit Forum
2D Toolkit => Support => Topic started by: JBabz on July 30, 2013, 06:45:34 pm
-
Sorry for asking so many questions. I'm learning a lot, though.
So I'm fiddling, trying to get my character to always "face" the mouse pointer.
He is on the XZ plane, so I want Y location to be totally disregarded, this is 2D.
Any pointers?
I know that the first thing I need to do is get the mouse position as a world position using Camera.mainCamera.ScreenToWorld() or whatnot.
Then, I'm lost. :)
-
once you have a world position, do something like this:
http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,1957.msg9693.html#msg9693
swapping z for y.