Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

Smooth accelerometer input

$
0
0
I currently have the camera set up to rotate with the same orientation of the user's iOS device. The code works fine, however, the accelerometer input is very jittery. I'm barely moving the phone and the camera is jerking all over the place. How can I make the rotation of the Camera (or any object) a smoother movement? Here is the line of code I am using: function Update () { transform.rotation = Quaternion.Euler(transform.rotation.x,transform.rotation.y,((Input.acceleration.x* (-90)))); }

Viewing all articles
Browse latest Browse all 4709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>