Quaternion.Inverse Manual     Reference     Scripting  
Scripting > Runtime Classes > Quaternion
Quaternion.Inverse

static function Inverse (rotation : Quaternion) : Quaternion

Description

Returns the Inverse of rotation.

JavaScript
// Sets this transform to have the opposite rotation of the target

var target : Transform;
function Update () {
transform.rotation = Quaternion.Inverse(target.rotation);
}