Really newbie questions about accelerometer
OK--I'm trying to have an actor constantly move up. Kind of like a balloon. The way to control it is to rotate the ipod, and navigate around baddies.
I know I need to look into device--accelerometer--but then--am I using X, Y, or Z? I've looked thru some of the wiki articles and such, but I still am having trouble.
I know I need to look into device--accelerometer--but then--am I using X, Y, or Z? I've looked thru some of the wiki articles and such, but I still am having trouble.
Comments
www.youtube.com/user/GameSaladCookbook#p/search/0/8HUCo_c2vUw
I would think that you would probably have to have the x controlled by the x (obvious?) or possibly y depending on which orientation of the device you are using and then have the ballon on a constant speed with a braking or acceleration based on the other axis of movement.
Good luck and stay away from self calibrating the game for starting device orientation until you have everything working if you are not too sure about it, and then if you want to get fancy...
cheers kipper
I'm not worried about calibrating yet (I'm a long way from that)...
I think if I rephrase the question, it might help for simplicity on both ends: Let's say I want an arrow to always point towards the ground. I want earth's gravity to be the iphones gravity, so to speak. The phone is held so that the screen is at a 90 degree angle to the ground--like a wall. How can I pull a 0-360 number (for the arrow) from the X or Y (or both--I'm not sure whether I need one or two) accelerometer attributes?
I just did the labrynth demo for the 4th or 5th time, and realized I could just reverse the direction of the ball--so it goes up when I when normally I'd want it to go up. I knew the answer had to be simple.
Thanks again for your help kipper.