x


shoot in direction of tilt

Hello I am creating a 2d platformer for android, where the character is controlled using the accelerometer. I have used the roller ball script to control my character and the shooter script I am currently using can be found here. My problem is that I need to shoot to the right when tilting the phone to the right and shoot to the left when tilting the phone to the left. I have continuously attempted to apply the logic in the roller ball script to my shooter script to no avail. If anybody can help me accomplish this, it would be greatly appreciated.

thanks

more ▼

asked Apr 24 '12 at 12:39 AM

dutch gravatar image

dutch
0 1 1

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

0 answers: sort voted first
Be the first one to answer this question
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:

x286
x275
x141
x67

asked: Apr 24 '12 at 12:39 AM

Seen: 379 times

Last Updated: Apr 24 '12 at 12:39 AM