Ejemplo n.º 1
0
    private void DrawForces()
    {
        if (_c.isCanDrive != true)
        {
            return;
        }

        // Draw induced lateral friction Fy
        RoboUtils.DrawRay(_lateralForcePosition, 0.3f * -Fy * transform.right, Color.magenta);

        // Draw observed forces
        RoboUtils.DrawLocalRay(transform, transform.up, _wheelAcceleration.z, transform.forward, Color.gray);
    }
Ejemplo n.º 2
0
    private void DrawWheelVelocities()
    {
        if (_rb == null)
        {
            return;
        }
        if (_c.isCanDrive != true)
        {
            return;
        }

        var offset = 0.05f * transform.up;

        RoboUtils.DrawRay(_wheelContactPoint + offset, _wheelVelocity * 0.1f, Color.black);
        RoboUtils.DrawRay(_wheelContactPoint + offset, (_wheelForwardVelocity * 0.1f) * transform.forward, Color.blue);
        RoboUtils.DrawRay(_wheelContactPoint + offset, (_wheelLateralVelocity * 0.1f) * transform.right, Color.red);
    }