WheelController.FixedUpdate C# (CSharp) Method

FixedUpdate() public method

public FixedUpdate ( ) : void
return void
    void FixedUpdate()
    {
        /*
        if (overrideSlipRatio)
            slipRatio = overridenSlipRatio;
            */
        ConfigurableJoint j = GetComponent<ConfigurableJoint>();
        suspensionDistance = (transform.position.y - j.connectedBody.position.y);

           // j.connectedBody.AddForceAtPosition(j.connectedBody.transform.up * -suspensionDistance * 10.0f, transform.position);

        if (Physics.Raycast(transform.position, -rigidbody.transform.up, out groundInfo, radius, raycastIgnore))
        {
            prevNormal = groundInfo.normal;
            //Debug.Log(name + ": " + Vector3.Dot(groundInfo.normal, prevNormal));
            SimulateTraction();
            isGrounded = true;
        }
        else
        {
            isGrounded = false;
            //Debug.Log(name + " flying");
        }
    }