My actor floats to the top of the screen after testing on my app on iPad device
redlotusdesignz
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!
Please help ^^; Thanks!
Best Answers
-
bjandthekatz Orlando, FlPosts: 1,375try removing the game from iPad
Open Gs Viewer
Click Recent
Click Clear All
Reinstall the game onto it
retry
Do you have accelerometer on?Need Help? Email Me | Templates | Full Game Source Code
-
bjandthekatz Orlando, FlPosts: 1,375@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 hereIt'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.1Need Help? Email Me | Templates | Full Game Source Code
Answers
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
Need any more help? I'm happy to.
Need Help? Email Me | Templates | Full Game Source Code
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?