Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/UKismetMathLibrary
Description
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! The W element is ignored.
| Name | Vector4_MirrorByVector3 |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/Kismet/KismetMathLibrary.h |
| Include Path | #include "Kismet/KismetMathLibrary.h" |
| Source | /Engine/Source/Runtime/Engine/Classes/Kismet/KismetMathLibrary.inl |
UFUNCTION (BlueprintPure, Meta=(ScriptMethod="MirrorByVector3", Keywords="Reflection"),
Category="Math|Vector4")
static UE_FVector4 Vector4_MirrorByVector3
(
const FVector4 & Direction,
const FVector4 & SurfaceNormal
)
Reflected vector.
Parameters
| Name | Remarks |
|---|---|
| Direction | Direction vector the ray is coming from. |
| SurfaceNormal | A normal of the surface the ray should be reflected on. |