Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

float3x3.LookRotation

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static float3x3 LookRotation(float3 forward, float3 up);

Parameters

Parameter Description
forward The forward vector to align the center of view with.
up The up vector to point top of view toward.

Returns

float3x3 The float3x3 view rotation matrix.

Description

Returns a float3x3 view rotation matrix given a unit length forward vector and a unit length up vector. The two input vectors are assumed to be unit length and not collinear. If these assumptions are not met use float3x3.LookRotationSafe instead.