Rotate Mesh by Material
Spin a mesh on the GPU by feeding the RotateAboutAxis node into World Position Offset.
Use the RotateAboutAxis node to rotate meshes purely by the material. This moves the rotation work from the CPU over to the GPU. Do note that this doesn’t move the physical location of the mesh, so its transform and collision stay right where they were.
How do I set it up?
Plug the output of RotateAboutAxis into the World Position Offset input of the main material node. The node returns an offset from each vertex’s current position, which is exactly what World Position Offset expects.
| Input | Description |
|---|---|
NormalizedRotationAxis | The axis to rotate around, as a normalized vector. For example, (0, 0, 1) spins around Z. |
RotationAngle | How far to rotate. With the default Period of 1, a value of 1 is one full rotation. |
PivotPoint | The world space point the axis passes through. The ObjectPivotPoint node gives you the actor’s pivot. |
Position | The world space position of each vertex. Use the Absolute World Position node here. |
All four inputs are required. To spin the mesh continuously, drive RotationAngle with a Time node multiplied by a speed value.
Is there a simpler version?
For simple spins around the world X, Y, or Z axis, the engine also ships the RotateAboutWorldAxis_cheap material function. A Rotation Amount of 1 is one full rotation there too.
Frequently asked questions
Why does the lighting look wrong on the rotated mesh?
Only the vertex positions move, and the normals stay as they were. The engine includes FixRotateAboutAxisNormals material functions for this case.
Why does the mesh pop out of view?
The mesh bounds don’t follow the rotation, so the mesh disappears when its bounds go off screen. To fix it, raise Bounds Scale on the component, or set Max World Position Offset Displacement in the material’s World Position Offset category.
Can I turn the effect off for some meshes?
Yes. Static Mesh Components have Evaluate World Position Offset and World Position Offset Disable Distance in their advanced Rendering settings, which turn the effect off per component or past a set distance.
Links
Check out the following resources to learn more about the subject.
Unreal Directive is free and ad-free.
If it saved you time, you can help keep it that way.

