Rigidbody.SweepTest - Local or Global axis?

When I run a SweepTest along some Vector3 direction on a Rigidbody object - Does Unity perform that test on a direction relative to that object’s rotation or is sweeping on the global, absolute directions?


Except for the Relative functions (AddRelativeForce, AddRelativeTorque etc.), all Physics functions use world space - you can see this in the SweepTest example (reproduced below), where transform.forward is used to get the rigidbody forward direction in world space:

var hit : RaycastHit;

function Update () {
    // Cast rigidbody shape 10 meters forward, to see if it is about to hit anything
    if (rigidbody.SweepTest (transform.forward, hit, 10)) {
        Debug.Log(hit.distance + "mts distance to obstacle");