Accelerator inverted...help?!

orien2v2orien2v2 Member, PRO Posts: 55
edited November -1 in Working with GS (Mac)
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?

Comments

  • orien2v2orien2v2 Member, PRO Posts: 55
    Also another question: I'm making something like a list for my game and I want to get that drag control like in the music list or any list which seems to spring back when it reaches the edge. How can I do like a drag and release and it continues to go towards the direction I just released my finger. thanks!
  • ChaserChaser Member Posts: 1,453
    There is a post from way back, don't know where it is but I submit Ghost Words in 1 landscape and they didn't give me any trouble. http://itunes.apple.com/us/app/ghost-words/id354092793?mt=8
  • orien2v2orien2v2 Member, PRO Posts: 55
    when did you submit it? Could it be that this is a new rule which they've just implemented recently?
  • ChaserChaser Member Posts: 1,453
    I submitted updates at least a month after the rule came out. For both iPhone and iPad versions. But if you want to be safe you'll have to look for that post. Also I took a screen shot of somebodies rules for the cam thing never tried it though. Email me for pic
    DeMentidApps at gmail.com
  • orien2v2orien2v2 Member, PRO Posts: 55
    Email sent! But does anyone still have some ideas I could try out??? Especially for my 2nd question??? ANYTHING would do! I've been stuck for days now! HELP!!!
  • HachikoHachiko Member Posts: 330
    I'd do it like this, don't know if there are better ways though.
    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 :D
  • orien2v2orien2v2 Member, PRO Posts: 55
    @Hachiko
    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!
Sign In or Register to comment.