Help with rotating device

I am working on a ebook o help my family bring home a little boy from china. I was wondering if some one would be able to help me fix this problem in the video. If you need to look at the app please just ask and I will give you the file.



Any help will be great
Thanks Conner

Comments

  • BIG_THINKIN_APPSBIG_THINKIN_APPS Member Posts: 944
    Hey here is the link app file to the app if anyone wants to look at it to see if they can tell me what needs to be fixed.

    https://www.dropbox.com/sh/e67jqburve4gd1d/zqiY7z94zU

    Thanks
    Conner
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    When I preview it on an iPad2, it works fine and the ball rolls to the right when the iPad is tilted right/clockwise for scene "9."

    Try creating a new blank scene and adding all of the actors back on. Does that fix it for you?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • SocksSocks London, UK.Member Posts: 12,822
    edited November 2013
    On an iPad3 the accelerometer is back-to-front, in all scenes when I tilt the left side down the ball rolls to the right (rather than to the left).

    The happens whether I am using the iPad flat (like it's flat on a desk) - or using it upright in front of me (like a computer monitor).
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @Socks... any idea why that would be since it works as expected on an iPad2? Are the iPad3 accelerometer values in fact different or are you just saying that when you play it, the controls seem reversed?

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • SocksSocks London, UK.Member Posts: 12,822
    @Socks... any idea why that would be since it works as expected on an iPad2? Are the iPad3 accelerometer values in fact different or are you just saying that when you play it, the controls seem reversed?
    I'm not sure to be honest ?

    The accelerometer values on all iPads are the same (my old iPad 1 and 2 tests using the accelerometer work as expected on my iPad 3).

    Basically when I tilt the iPad left, that's to say I lower the lefthand side and raise the righthand side - the 'ball' moves to the right, i.e. it rolls 'uphill'.
  • BIG_THINKIN_APPSBIG_THINKIN_APPS Member Posts: 944
    When my iPad mini has the volume buttons on the top and I tilt the iPad to the right the ball goes to the right.

    The problem is when the iPad has the volume buttons on the bottom and I tilt the iPad to the right the ball goes to the left.


    It should be that both ways that you hold the iPad that when you tilt the iPad to right the ball moves to the right and the same with the left.

    Try holding you iPad both ways

    I hope this makes sense.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited November 2013
    If you add a DisplayText actor with game.Accelerometer.Y, you'll see the value flips sign when the device is rotated 180°. So when I tilt right it's Y=0.1, 0.2, 0.3, etc. but if I turn it around upside down and tilt right it's Y=-0.1, -0.2, -0.3, etc.

    Okay, you'll need to make use of the game.Screen.Device.Orientation attribute which changes from 0 to 1 when rotated. If you add that as a condition, you'll be able to have two separate rules for negative and positive values.

    Edit: see demo below.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Here's a demo.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • BIG_THINKIN_APPSBIG_THINKIN_APPS Member Posts: 944
    If you add a DisplayText actor with game.Accelerometer.Y, you'll see the value flips sign when the device is rotated 180°. So when I tilt right it's Y=0.1, 0.2, 0.3, etc. but if I turn it around upside down and tilt right it's Y=-0.1, -0.2, -0.3, etc.

    Okay, you'll need to make use of the game.Screen.Device.Orientation attribute which changes from 0 to 1 when rotated. If you add that as a condition, you'll be able to have two separate rules for negative and positive values.
    Thanks for getting back to me. All this sounds a little bit confusing to me becuase I know very little. So I was wondering if I could just copy and paste from the test app you gave me.

    Thanks
    Conner
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited November 2013
    So I was wondering if I could just copy and paste from the test app you gave me.
    From the demo I posted above? Of course! That's what demos on the forums are for. The only time you can't borrow code from someone else is if it's a paid template/app and you haven't both paid for it and asked the developer if it's okay.

    So thanks for asking but please assume that anything I post here as a "demo" is fair game for you to use for any purpose since I've usually created it to answer a forum question.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • BIG_THINKIN_APPSBIG_THINKIN_APPS Member Posts: 944
    edited November 2013
    Thanks for getting back to me @tatang. I think I am just messing it up even more. I really need to get it fixed so if anyone has free time and would like to help me. Then please email me at info(@)bigthinkinapps.com or pm or just reply to this post. I may just need some one to go into the app and fix it give me a step by step. I would be very appreciative. I really would like to get this app out on the App Store before my parents leave to China which is in about 2 or 3 weeks. (:

    BTW I can't wait to bring my little brother home!

    Thanks
    Conner
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @BIG_THINKIN_APPS

    Conner,

    Send me a link to download the file. Seeing as how you're a very good-intentioned person with all of your charity work and since you Skyped with my students and helped me out a while back, I'll do this work for free.

    Tatian

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.