calibrating accelerometer

rustbucketrustbucket Member Posts: 19
edited November -1 in Working with GS (Mac)
I know there's been a couple of posts about calibrating but I'm not sure any of them apply to the way I'm controlling the player. I'm using the following rule to have the player constrained to the accelerometer values which result in a very smooth movement. (believe I have Tshirtbooth to thank for this?)

constrain attribute behavior
self.postionY
to
self.Position.Y+((min(.5,max(-.5,( game.Accelerometer.Y ))))*17)

Problem with this is if you're holding the device at an angle my character immediately start moving down. Other than starting the player at the bottom of the screen bumped up again an invisible wall I'm not what to do. Any suggestions would be awesome, cheers!

Comments

  • rustbucketrustbucket Member Posts: 19
    Figured out a solution, I put an invisible wall behind the actor spawn point that when it collides with the player will destroy itself after 2 seconds. Sorta low rent vs scripting but its working smoothly so I'm going with it.
Sign In or Register to comment.