Question by
wunschmaschine · Nov 05, 2015 at 01:06 PM ·
camerarotationcamera rotatearduinocamera rotation
Rotate Unity3D FirstPersonCamera with values from Arduino in form of -127 to 127 (degrees) …
0 down vote favorite I’m trying to rotate my FirstPersonCamera in Unity3D with values which I get from Arduino in form of -127 to 127 (degrees) via Serial.write … Arduino gets the data from a connected magnetometer.
When Unity reads a value which is < 0, then the camera should rotate to the left, when Unity reads a value which is > 0, then the camera should rotate right.
The higher the difference between the read value and 0, the more/faster the camera should rotate.
Can anyone please help with setting this up in Unity?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612043954im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Recognize when ever camera looks up and turns back down 0 Answers
Tilt camera on movement 2 Answers
Object Rotate with Camera 2 Answers
Camera Quaternion.RotateTowards without rolling/banking 1 Answer