- Home /
Negative torque problem
void FixedUpdate()
{
rb.AddRelativeForce(-10 * Input.GetAxis("Vertical"), 0, 0);
float turn = Input.GetAxis("Horizontal");
if (turn < 0)
{
turn = -1;
}
else if (turn > 0)
{
turn = 1;
}
rb.AddRelativeTorque(Vector3.up * 10 * turn);//****in this line 10 must be 7
}
I have this script in a cube and seems work well but too fast for me and decided reducing 10 to 7 in AddRelativeTorque function. But then cube only rotates right (when vector positive) does not rotate left.
Honestly this is just experimental not important but really want to why cube acts weird?
Comment
Your answer
Follow this Question
Related Questions
Calculating Sphere vs. Plane Friction 1 Answer
How does unity add torque 1 Answer
Understanding how torque is applied 2 Answers
Kill Rotation of object using forces 0 Answers
Equivalent to this using torque 1 Answer