Version: 2017.3 (switch to 2017.4)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Quaternion.Inverse

public static method Inverse(rotation: Quaternion): Quaternion;

Description

Returns the Inverse of rotation.

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

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

Did you find this page useful? Please give it a rating: