TransformDirection(Vector3.forward) vs transform.forward

What's the difference between using TransformDirection(Vector3.forward) and transform.forward?

  • crew

    TransformDirection "transforms" the direction from local space to world space. Transform.forward uses the "blue axis" of the transform in world space which is the Z axis, but also takes into account the rotation of the object. The latter can be useful for moving an object along it's Z axis, so if it rotates it'll always point in the direction of the objects Z axis.