Question by
tenthplanet0 · Apr 24, 2016 at 10:30 AM ·
2d gameballaccelerometerfrictionmaze
apply z-axis friction on 2d game
Hi developers,
I am in need of help as i am not able to find a solution to my problem. please help me with ideas or code. I am trying to make a 2D maze ball game and I am using accelerometer to move the ball in x and y axis. The ball is moving but the movement is looking like the ball is floating in air. For this reason I am thinking to add friction in z-axis, I don't know if this is the best way to give ball the realistic movement.
I also want to reduce the speed of the movement of the ball when user tilts the device in the opposite direction of the ball movement. The more user tilt the device to the opposite direction the more brake has to be applied. please let me know how I can get this behaviour.
The help will be very much appreciated.
Comment