TransformExtensions.

LookAt(TransformComponent, Vector3, Vector3, float) Method

Summary

Sets the transforms rotation so it's forward vector points at the target.
Namespace
StrideToolkit.Engine
Containing Type
TransformExtensions

Syntax

public static void LookAt(this TransformComponent transform, Vector3 target, Vector3 worldUp, float smooth = 1)

Remarks

This method updates the TransformComponent.LocalMatrix and TransformComponent.WorldMatrix after transformation.

Parameters

Name Type Description
transform TransformComponent The TransformComponent to update.
target Vector3 The target to point towards
worldUp Vector3 A Vector specifying the upward direction.
smooth float Value between 0 and 1 indicating the weight of target orientation. The default is 1.

Return Value

Type Description
void