Accelerator inverted...help?!
orien2v2
Member, PRO Posts: 55
I hope I won't get flamed but I did use the search and still couldn't find anything other than telling me that I need to do something but I don't know how.
My game uses the accelerometer for movement and Apple requires that all apps must at least support two orientations. So in my case it's landscape left (LL) & landscape right (LR).
Problem is my game is ok in LL, but everything is inverted in LR (e.g. Up -> Down, Down -> Up). So HOW do I invert the direction when it's in LR? And yes I followed t-shirtbooth's tutorial obviously but now that I know how to use the accelerometer, how can I make it work in both landscape orientations?
My game uses the accelerometer for movement and Apple requires that all apps must at least support two orientations. So in my case it's landscape left (LL) & landscape right (LR).
Problem is my game is ok in LL, but everything is inverted in LR (e.g. Up -> Down, Down -> Up). So HOW do I invert the direction when it's in LR? And yes I followed t-shirtbooth's tutorial obviously but now that I know how to use the accelerometer, how can I make it work in both landscape orientations?
Comments
DeMentidApps at gmail.com
You have, in one actor, a rule that says : when in landscape left, game.attribute.yourattributename = +1, when in landscape right = -1.
Then, you add * game.attribute.yourattributename to your accel formula. That way, if for example accel is at 0.4 when in landscape left, it will be something like accel*yourattributename, so 0.4*1, which does 0.4 .
When in landscape right, to move the same way of landscape left, you must invert that 0.4. So it will be accel*yourattributename, 0.4*(-1) = -0.4 .
Practically you change the sign I'm not good at explaining, lol, but I hope it's understandable
Yes I get it I've once read a post about inverting it with a -1 but I can't find it anymore and thankfully you provided some much needed info here...I'll give it a try when I'm home! If this worked I'll make a video about it because I think A LOT of games will need to fix this to comply with Apple's set of rules!