- Home /
Question by
trevorjkeegan · Nov 23, 2020 at 02:33 AM ·
rigidbodyaddforcetransform.positiontransform.translatemoveposition
Can an accelerometer be used for a RigidBody based movement?
I have a player object that utilizes RigidBody for jumps and collision. I'd like to use the accelerometer to move the playerobject. I have found success using transform.translate and transform.position to move the player object, however the movement is jittery. It is my understanding that the Rigidbody and the non rigidbody movement methods are contradicting causing the jitter. I am trying to solve by using a rigidbody movement method like AddForce, MovePosition, or SetVelocity but can't get the input from the accelerometer to control these. Can anyone help me with what code I need to use to use the accelerometer for a rigidbody method of moving the playerobject? Thank you in advance.
Comment