My actor floats to the top of the screen after testing on my app on iPad device

redlotusdesignzredlotusdesignz Member, PRO Posts: 65
Hi everyone, I'm new here. I just finished making a game that requires the actor to move left and right based on the buttons. It works fine on GameSalad. After I published the app and tested it on the iPad device, I noticed that whenever the game starts, the actor floats to the top. When I move my iPad, the actor moves on its own and not corresponding to the buttons on the screen.

Please help ^^; Thanks!

Best Answers

  • bjandthekatzbjandthekatz Orlando, FlPosts: 1,375
    Accepted Answer
    try removing the game from iPad
    Open Gs Viewer
    Click Recent
    Click Clear All

    Reinstall the game onto it
    retry
    Do you have accelerometer on?
  • bjandthekatzbjandthekatz Orlando, FlPosts: 1,375
    edited June 2012 Accepted Answer
    @redlotusdesignz no you don't have to remove it, what you have to do is have the iPad flat on a 0Degree angle
    OR
    calibrate it to a 45Degree Angle like shown here
    It's not too difficult, just requires a few attributes. I created two attributes called calibratedX and calibratedY.

    I then have a button called calibrate that has a rule on it, when touched it sets game.calibratedX to game.accelerometerX. Same thing for calibratedY.

    then just update your move rules to use those values instead of the stock -0.1 or 0.1

Answers

  • redlotusdesignzredlotusdesignz Member, PRO Posts: 65
    Yes I do have accelerometer on. Do I have to remove it from my actor?
  • redlotusdesignzredlotusdesignz Member, PRO Posts: 65
    On my actor I have the following (in terms of moving it back and forth):

    Rule:
    Attribute game.Accelerometer.x > 0

    Move:
    Direction is at 90
    Speed 300
    Relative to Actor

    Rule:
    Attribute game.Accelerometer.x <0

    Move:
    Direction 270
    Speed 300
    Relative to Actor

  • bjandthekatzbjandthekatz Orlando, FlMember Posts: 1,375
    edited June 2012


    Rule:
    Attribute game.Accelerometer.x > Game.Calibration.X

    Move:
    Direction is at 90
    Speed 300
    Relative to Actor

    Rule:
    Attribute game.Accelerometer.x < Game.Calibration.X

    Move:
    Direction 270
    Speed 300
    Relative to Actor

    I believe thats how you do it. and don't forget to make calibration button. And when you publish it make sure to have the orientation how you want it.
    Need any more help? I'm happy to.
  • redlotusdesignzredlotusdesignz Member, PRO Posts: 65
    I have two buttons on the screen. A right arrow and a left arrow. I made two attributes on it that are left and right.

    So for example:

    Rule
    When actor receives event touch is pressed

    Change attribute
    game.right to true

    Otherwise

    Change attribute
    game.right to false

    Is the calibration button invisible or does it need to be visible on the screen?

  • redlotusdesignzredlotusdesignz Member, PRO Posts: 65
    okay i was able to fix the issue :) i just got rid of the accelerometer property and just simply added the accelerate option. i just didn't want my poor actor to tilt lol
Sign In or Register to comment.