- Home /
Android: Camera Look Around
How to make Camera Look Around like this http://www.youtube.com/watch?v=XN8x9sUHSC4 (time 0:55) in Android Device ? Anyone please :)
Answer by tanoshimi · Jan 02, 2014 at 05:04 PM
Set the rotation of the camera based on Input.gyro.attitude.
Can you attach with the sample code or link tutorial, please?
GameObject camParent = new GameObject ("CamParent");
camParent.transform.position = transform.position;
transform.parent = camParent.transform;
camParent.transform.Rotate(Vector3.right, 90);
rotFix = new Quaternion(gyro.attitude.x, gyro.attitude.y, -gyro.attitude.z, -gyro.attitude.w);
transform.localRotation = rotFix;
From: http://alastaira.wordpress.com/2013/08/24/the-7dfps-game-jam-augmented-reality-and-spectral-echoes/
I'm use this sample assets : http://blog.heyworks.com/wp-content/uploads/2013/01/GyroController.unitypackage
But why it's not work in my Android device ? Just only show on "Z+ Forward object"
Well, if there's a bug in an asset you're using, you should probably contact whoever wrote the asset...
Your answer
Follow this Question
Related Questions
Android App crashes when camera moves (Nexus 7) 0 Answers
Need help with tilt in unity 1 Answer
Keyboard Camera control script question 1 Answer
Camera Script problems 1 Answer