|
I making a top down space shooter similar to Astroids. I want to use my joystick's right analog stick to fire the players weapon similar to any game on PSN or XBLA of the same genre. How would I acchomplish this in CSharp? Java is also fine if you don't know CSharp.
(comments are locked)
|
|
In the input manager you can define extra controls such as the x and y axis of a second joystick (default is accept data from all joysticks so you might want to change that). Assuming the right stick is read as a second joystick, you can use the input from the right stick to aim your weapon similar to walking. Use the look at function to turn your character to face the direction of the joystick e.g. transform.LookAt(transform.position + Vector3.( Input.GetAxis ("Horizontal"),0, Input.GetAxis ("Vertical")); I see, I was wondering about that. Also there is still the need to for some code to make the player rotate depending on the direction the joystick goes. I think I can figure that out, but I would still appreciate any help.
Apr 28 '10 at 01:54 AM
RamenxNoodles
For some reason Unity is not registering my joystick anymore so I will have to put this on hold. Thanks for the answer though it makes sense.
May 04 '10 at 09:59 PM
RamenxNoodles
(comments are locked)
|
