- Home /
Question by
Celledor · Mar 27, 2018 at 07:48 AM ·
accelerometeraccelerationphoneslidingtable
Detect phone sliding movement across table
Hi,
I'm trying to find a way to detect if the player is sliding the phone across the table. This will move the game camera that is facing downwards. So if I slide the phone 1 cm to the right, the camera will move "1 cm" to the right.
However I also need to rotate the camera across the Y axis, "Yaw?" as I rotade the phone, still while laying flat on a table.
I have tried to use Input.acceleration to access the accelerometer but this dosn't work so well as the values changes when the phone is tilted (shouldn't that be the gyroscope).
Comment
Your answer
