Click or drag to resize

TransformLookingAt Method

Returns a copy of the transform rotated such that its -Z axis (forward) points towards the target position. The transform will first be rotated around the given up vector, and then fully aligned to the target by a further rotation around an axis perpendicular to both the target and up vectors. Operations take place in global space.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public Transform LookingAt(
	Vector3 target,
	Vector3 up
)

Parameters

target
Type: GodotVector3
The object to look at.
up
Type: GodotVector3
The relative up direction

Return Value

Type: Transform
The resulting transform.
See Also