TransformExtensions.

LookAt(TransformComponent, Vector3, float) Method

Summary

Sets the transforms rotation so it's forward vector points at the target. The world up vector use is defined by WorldUp.
Namespace
StrideToolkit.Engine
Containing Type
TransformExtensions

Syntax

public static void LookAt(this TransformComponent transform, ref Vector3 target, 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
smooth float Value between 0 and 1 indicating the weight of target orientation. The default is 1.

Return Value

Type Description
void