Legacy Documentation: Version 4.6(go to latest)
Language: English
  • C#
  • JS
  • Boo

Script language

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

Quaternion.ToAngleAxis

public function ToAngleAxis(angle: float, axis: Vector3): void;

Description

Converts a rotation to angle-axis representation.

	// Extracts the angle - axis rotation from the transform rotation

var angle = 0.0; var axis = Vector3.zero; transform.rotation.ToAngleAxis(angle, axis);