Rotation in UE4 has such a complete implementation that it can be hard to choose how to rotate your objects. There are three main methods: FRotator, FQuat, and FRotationMatrix. This recipe outlines the construction and use of the first of the three different methods for the rotation of objects—the FRotator. Using this, and the following two recipes, you can select a method to use to rotate your objects.
Core/Math API – rotation using FRotator
Getting ready
Open a UE4 project that has an object you can get a C++ interface with. For example, you can construct a C++ class Coin that derives from Actor to test out rotations. Override the Coin::Tick() method to apply your rotations from the C++ code. Alternatively...