{ }Blueprint → C++

Unreal Engine 5 · Blueprint → C++

Sin / Cos / Tan (Radians) in Unreal Engine 5 C++UE Docs

The radian Sin, Cos, and Tan Blueprint nodes map to FMath::Sin(Radians), FMath::Cos(Radians), and FMath::Tan(Radians) in Unreal Engine 5 C++.

Blueprint node & C++ equivalent

C++
float S = FMath::Sin(Radians);
float C = FMath::Cos(Radians);
float T = FMath::Tan(Radians);

What do the Sin, Cos, and Tan nodes do?

These trigonometric functions take an angle in radians and return the sine, cosine, or tangent. They are the building blocks for oscillating motion, circular placement, wave effects, and angle-based math.

Because they expect radians, an angle stored in degrees must be converted first.

The C++ equivalent

Call FMath::Sin(Radians), FMath::Cos(Radians), or FMath::Tan(Radians), each returning a float. These wrap the standard library trig functions and accept any radian value.

All three live in the FMath namespace and need no extra includes in standard gameplay files.

When to use it in C++

Use FMath::Sin driven by accumulated game time to create smooth bobbing or pulsing effects. Pair Sin and Cos to place objects evenly around a circle, multiplying each by a radius. Convert degree inputs with FMath::DegreesToRadians before calling these functions.

Frequently asked questions

Do FMath::Sin and FMath::Cos use radians or degrees in UE5?+

They use radians. Convert a degree value with FMath::DegreesToRadians before passing it, or use the DegSin and DegCos helpers in UKismetMathLibrary.

What does FMath::Tan return in Unreal?+

It returns the tangent of the radian angle as a float. The value approaches infinity near odd multiples of pi/2, so guard against those inputs.

Related Math nodes

View all Math nodes →