TransformExtensions.

LookAt(TransformComponent, TransformComponent, 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, TransformComponent target, ref 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 TransformComponent 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