- Home /
Moving object with tilting the device.
I'm working on a pinball game for mobile devices (android atm).
I want the player to be able to move the ball a little bit to the left and right by titling the device left and right. Kinda like a real pinball machine when you tilt it.
How do I know when the player tilts his device left or right?
How can I add a force to my ball so it moves a bit to the left or right?
Check this out:
http://unity3d.com/learn/tutorials/modules/beginner/platform-specific/accelerometer-input
Add a force to the ball using the accelerometer Vector3's x-Axis multiplied by a float you can adjust for tweaking
Answer by Jayraj_desai · Jul 06, 2015 at 09:09 AM
You can have look at following videos- https://youtu.be/PcsN-FgA3Ds https://youtu.be/H4p-usK4tqw https://youtu.be/Az0gVguN59M,You can have look at my following videos- https://youtu.be/PcsN-FgA3Ds https://youtu.be/H4p-usK4tqw https://youtu.be/Az0gVguN59M