x


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.

more ▼

asked Jul 03 '10 at 03:36 PM

Karl Kujak gravatar image

Karl Kujak
71 12 12 16

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Nov 23 '12 at 09:58 PM

ATNEDev gravatar image

ATNEDev
1

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x984
x132
x26
x11

asked: Jul 03 '10 at 03:36 PM

Seen: 1696 times

Last Updated: Nov 23 '12 at 09:58 PM