Skip to main content
TikTok Effect House Platform Logo
Latest
Download
Log in
Math

Normalize

Use Normalize to normalize the input vector. That is, return a vector of the same direction as the input with a length of 1. Supported types: Vec2, Vec3, and Vec4. Normalize is in the Math category.

Input

NameData typeDescription
AVec4The vector to be normalized

Output

NameData typeDescription
ResultVec4The normalized vector with a length of 1

Example

In this example, we calculate and get the normalized direction from the alien to the UFO, then transform the alien to move towards the UFO ‘s direction at a uniform speed.