Check if collider touching anything

I have a collider that is subject to 2 control methods. It is a wheel. When on the ground, I propel it, naturally, by adding torque, but I want to be able to move it in midair. I figured I would just add Forces, but I don’t want the forces to be applied when the wheel it just sitting. So, in short, how to I check if the collider is on the ground or not?

Note: I am NOT using a character controller, as I need to be affected by physics. I know it is easy that way, but a ChracterController is not an option.

Well, if it’s a wheel, it’s probably worth your time checking out the Wheel Collider docs.

To answer your question, you would use OnCollisionStay with an if statement checking that the tag of the collider it’s hitting is ground or some other appropriate tag you choose. Then you just make sure you tag anything you want as ground and then put your appropriate torque code in that if statement.

OnCollisionStay(col:Collision){
    if (col.gameObject.tag == "ground")
        //apply torque