Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


LookAt(float3, float3, float3)

Returns a float4x4 view matrix given an eye position, a target point and a unit length up vector. The up vector is assumed to be unit length, the eye and target points are assumed to be distinct and the vector between them is assumes to be collinear with the up vector. If these assumptions are not met use float4x4.LookRotationSafe instead.
Read time 1 minuteLast updated 12 days ago

Definition

public static float4x4 LookAt(float3 eye, float3 target, float3 up)

Parameters

The eye position.

target

The view target position.

The eye up direction.

Returns

Type

Description

float4x4The float4x4 view matrix.