- Home /
2D Platformer Mouse aiming!
Hello guys,i need YOUR professional help.
So let's get to the point. I have 3D Character in 2Dimensional space,well its not an "OFFICIAL" 2D game,the camera is just in Orthographic mode.
Anyway i have perfect character controller and all i want to do is to make that 3D Character (its not spirite character) to look at my cursor (Camera Mode : Orthographic mode) ,and when i get over 90 degrees character rotates to opposite direction,JUST like in this video : https://www.youtube.com/watch?v=eofB2Z4-00w
I know guys you are smart and have alot of knowledge,thats why i need your help!
That is likely why this questions was passed over because ai$$anonymous$$g at the mouse has been covered a zillion times on UA, but you did not include a code attempt. Beyond that, how you do the rotation will depend on what side of your object you consider 'front' it doesn't matter if the object is 2D or 3D, what is the front side is important. As for the flipping, it can be done in three ways, 1) rotating the object 180 degrees (a shader that does not cull back sides is necessary), 2) changing the texture, and 3) negating the 'x' scale of the object. Choice 3 often results in issues with collisions (don't know if that is an issue for you), and the rotation code has to be a bit more special. Which one of these works for you will depend on the geometry.
Your answer
Follow this Question
Related Questions
active inactive gameobject child 0 Answers
How to convert to 2D 1 Answer
Images won't import as sprites? 1 Answer
Script gives wrong rotation. 1 Answer