TMatrix::InverseTransformVector

Transform a direction vector by the inverse of this matrix - will not take into account translation part.

Choose your operating system:

Windows

macOS

Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Math/Matrix.h

Include

#include "Math/Matrix.h"

Source

/Engine/Source/Runtime/Core/Public/Math/Matrix.inl

Syntax

TVector< T > InverseTransformVector
(
    const TVector< T > & V
) const

Remarks

Transform a direction vector by the inverse of this matrix - will not take into account translation part. If you want to transform a surface normal (or plane) and correctly account for non-uniform scaling you should use TransformByUsingAdjointT with adjoint of matrix inverse.

Faster version of InverseTransformVector that assumes no scaling. WARNING: Will NOT work correctly if there is scaling in the matrix.