How to Rotate a Mesh Using Material Nodes in Unreal Engine 5

Quick tip on how to use RotateAboutWorldAxis_cheap inside your material blueprint to get a spinning effect.

Unreal Engine 5 rotating material blueprint using RotateAboutWorldAxis_cheap
M_RotatingMaterial Blueprint

Software Versions: Unreal Engine 5.5.0

When building a section of the GD Tactics Gym I needed a coin to spin and I wanted try to leverage the simplest solution. I didn't want to reach for the rotator component or add logic to the tick function (still both great options), but rather try to keep everything inside the material Blueprint. The spinning feature is only for aesthetics and appearances so it didn't need more advanced logic.

I started by creating a new material, for this example I called it M_RotatingMaterial. I added a vector param for color and then most importantly and I added the RotateAboutWorldAxis_cheap node. The node accepts three parameters, for this example I only added an argument to the Rotation Amount to control the speed of the coin spinning. I took the material's Time node and multiplied that with a scalar parameter I called Delta that defaulted to 0.2f. Next, I took the Z-Axis return value and plugged into the material's World Position Offset pin.

Unreal Engine 5 rotating material blueprint using RotateAboutWorldAxis_cheap
M_RotatingMaterial using the RotateAboutWorldAxis_cheap node

And with that, we have a spinning coin. Below is the final result.

Unreal Engine 5 spinning yellow coin using the M_RotatingMaterial Blueprint
Coin using M_RotatingMaterial

I hope this helps. I was unaware of the RotateAboutWorldAxis_cheap node, but it's a great efficient way to add some cool features to a material.

Loading...