UKismetAnimationLibrary::K2_LookAt

Computes the transform which is "looking" at target position with a local axis.

Windows
MacOS
Linux

References

Module

AnimGraphRuntime

Header

/Engine/Source/Runtime/AnimGraphRuntime/Public/KismetAnimationLibrary.h

Include

#include "KismetAnimationLibrary.h"

Source

/Engine/Source/Runtime/AnimGraphRuntime/Private/KismetAnimationLibrary.cpp

Syntax

static FTransform K2_LookAt
(
    const FTransform & CurrentTransform,
    const FVector & TargetPosition,
    FVector LookAtVector,
    bool bUseUpVector,
    FVector UpVector,
    float ClampConeInDegree
)

Remarks

Computes the transform which is "looking" at target position with a local axis.

Parameters

Parameter

Description

CurrentTransform

The input transform to modify

TargetPosition

The position this transform should look at

LookAtVector

The local vector to align with the target

bUseUpVector

If set to true the lookat will also perform a twist rotation

UpVector

The position to use for the upvector target (only used is bUseUpVector is turned on)

ClampConeInDegree

A limit for only allowing the lookat to rotate as much as defined by the float value

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss