UKismetMathLibrary::GetReflectionVector

Given a direction vector and a surface normal, returns the vector reflected across the surface normal.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Kismet/KismetMathLibrary.h

Include

#include "Kismet/KismetMathLibrary.h"

Source

/Engine/Source/Runtime/Engine/Classes/Kismet/KismetMathLibrary.inl

Syntax

static FVector GetReflectionVector
(
    FVector Direction,
    FVector SurfaceNormal
)

Remarks

Given a direction vector and a surface normal, returns the vector reflected across the surface normal. Produces a result like shining a laser at a mirror!

Returns

Reflected vector.

Parameters

Parameter

Description

Direction

Direction vector the ray is coming from.

SurfaceNormal

A normal of the surface the ray should be reflected on.

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