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); }
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { public Transform target; void Update() { transform.rotation = Quaternion.Inverse(target.rotation); } }
Did you find this page useful? Please give it a rating: