Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

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

Quaternion.SetFromToRotation

SetFromToRotation(fromDirection: Vector3, toDirection: Vector3): void;
void SetFromToRotation(Vector3 fromDirection, Vector3 toDirection);
def SetFromToRotation(fromDirection as Vector3, toDirection as Vector3) as void

Description

Creates a rotation which rotates from fromDirection to toDirection.