- Home /
How to Rotate Mars-Rover-type vehicle? It moves forward and backward just fine, but can't turn.
Here you can see what it looks like moving forward and backward. https://gyazo.com/ebc74aab19df37ae7484869d9be6a8c6
However, I cannot for the life of me figure out how to make the rover turn. Or if it's even possible. The rocker-bogie suspension is just a bunch of hinge and fixed joints put together. The wheels are attached using hinge joints but I also tried using configurable joints to no avail (they would rotate on every axis regardless of whether I locked them or not).
To move forward I'm using this simple script to add Torque.
void Start()
{
rb = this.GetComponent<Rigidbody>();
}
void FixedUpdate()
{
float moveForward = Input.GetAxis("Vertical");
rb.AddRelativeTorque(transform.right * torque * moveForward);
}
Any help is appreciated.
Comment