Hi.
I’m trying rolling a cube with Horizontal inputs.
i used “AddTorqe” , but after a while its flying in the air. i don’t want that.
i want to roll a cube like its heavy (not too heavy) and step by step.
and when its in the middle of rolling to the right , its turn back when i press left key.
and when i release the keys in middle of rolling, physics push it to the correct direction.

i’m using this code. but no luck:
using UnityEngine;
using System.Collections;
public class rotate : MonoBehaviour {
public float torque = 100;
public Rigidbody rb;
void Start() {
rb = GetComponent<Rigidbody>();
}
void FixedUpdate() {
float turn = Input.GetAxis("Horizontal");
rb.AddTorque(transform.up * torque * turn);
}
}
maybe code is good, but not the other setting like (torque , gravity, Mass , Drag , Angular Drag…).
i don’t know.
Any help will be appreciated.

Thanks . that helps. but still dosn't feel like its heavy. its rolling fast and when its do rolling a while, some times its get airborne. adding material friction is improve physics but increasing any of frictions dosn't affect anything.
– mmd2sh