- Home /
AddTorque used properly?
Hi, I'm prototyping a top down game, where you steer an object down a slope. The object is a rigidbody and I'm using AddTorque to rotate it:
void FixedUpdate()
{
rigidbody.AddRelativeForce(Vector3.forward * 8 );
rigidbody.AddRelativeTorque( ( Vector3.up * ( Input.acceleration.x * 12.0f ) ));
}
So I'm trying to get the object to turn relative to the amount of tilt from the iPhone. However, although the object is turning, it doesn't feel particularly responsive or consistent - if I tilt a little it rarely turns, if I tilt a lot it turns too much and spins. This may just be down to the input from the iPhone, but I get the feeling I'm not using addtorque correctly.
So is this the correct method to achieve what I'm trying to?
Thanks
Your answer
Follow this Question
Related Questions
AddTorque application is too slow 1 Answer
Rotate a 2D Rigidbody to a desired angle using AddTorque? 3 Answers
Making a ball roll and keeping the axis? 2 Answers
determining angular acceleration. Is this possible, and if so how to do this? 0 Answers
AddTorque does not use ForceMode as expected (Different than AddForce) 1 Answer