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!
| Name | GetReflectionVector |
| 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="MirrorByVector", Keywords="Reflection"),
Category="Math|Vector")
static UE_FVector GetReflectionVector
(
FVector Direction,
FVector 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. |