Hi guys!
I’m trying to rotate my player using the accelerometer of my phone with this line of code:
myRigidBody.rotation = -Input.acceleration.x * rotationMagnitude; (<-this line of code is inside Update())
where rotationMagnitude is just a constant to increase the Input value.
Actually this works, but the player is also super shaky! How can I achieve a smoother result?
I’ve actually found some threads with some solutions (Mathf.smoothDamp seems to be the right answer) but I don’t really know how to apply them :(.
Can someone please help me using smoothDamp or do you have other solutions? Thank you so much!