I'm developing this game, i'm using gamma to move left and right plus i've added a behavior bound to layout but when i tilt my device, my object does work but doesn't stop at the end of layout.....it goes off the screen. Here is what i'm doing with gamma
Touch->Gamma orientation < 0 = player Move 300 * dt pixel at angle angle(Self.X,Self.Y,Self.Y-10,Self.Y)
Touch->Gamma orientation > 0 = player Move 300 * dt pixel at angle angle(Self.X,Self.Y,Self.Y+10,Self.Y)