Accelerometer / Rotate Causing Crash
micksolo
Member Posts: 264
Hi, I'm getting a crash bug caused by rotating using the accelerometer.
I have an actor who's falling, and their movement left and right is caused by the accelerometer. When I use the following rotate rule it works fine to face the direction i'm going
Constrain self.rotation -> abs(acos(game.Accelerometer.X))-90
However when I turn the device on its side (its a portrait game, so i flip it to landscape) the game crashes immediately.
When I turn this rule off, to stop the player from rotating, it does not crash when I flip the device. Anyone come across something like this before?
I have an actor who's falling, and their movement left and right is caused by the accelerometer. When I use the following rotate rule it works fine to face the direction i'm going
Constrain self.rotation -> abs(acos(game.Accelerometer.X))-90
However when I turn the device on its side (its a portrait game, so i flip it to landscape) the game crashes immediately.
When I turn this rule off, to stop the player from rotating, it does not crash when I flip the device. Anyone come across something like this before?