Add random rotation around axis of static mesh?

I do it by adding a rotation every frame. The rotation to add is fixed, but it’s set randomly at BeginPlay, so each Actor rotates at a different rate and in different directions.

To be easier to implement the behavior in other actors I do it as an ActorComponent.

90141-animation.gif

The var DegreesPerSecondMinMax is a Vector2D and RotationSpeed is a Rotator.

If you’re gonna have hundreds of these though, I’d recommend to rotate all at once inside a loop in PlayerController or some other manager class. It’s faster than having a lot of actors ticking in your scene.

Or do it with particles. Then you could make them GPU particles and have thousands of them.