- Home /
how to do 2.5D side scroller-Gun point towards mouse then -180 character turn
im really new to the unity programing. Im making a 2.5D game where the character walks around carrying a gun i want the gun to point towards where the mouse is. And then when the mouse goes behind the player i want to player to turn and be facing the mouse again. I have tried a lot of things but i really dont know even where to put the code. So if you have an answer for me could you tell me also how to set it up and where to put the code. Thanks very much.
Answer by ATNEDev · Nov 23, 2012 at 09:58 PM
I believe what you is to cast a ray from the gun and let the mouse follow the ray. When the mouse moves, the chest bone moves on the y axis that is x axis, and if the mouse x is less than 0 0 coordinates on the screen the character turns around.
Your answer
Follow this Question
Related Questions
Gun should point at mouse position 3 Answers
Rotate a gameobject(player)on the y axis towards mouse position in c# 2 Answers
Can't shoot towards mouse click point 1 Answer
Sprite Manager Animation/Walker Brothers Mario 1 Answer
Trying to get character to instantly rotate in 2.5d side scroller 1 Answer