Blueprint Rotating Movement Component


In UE3 we were able to make rotating actors through creating Mover (Interpactor) and adjusting it's Rotation Rate parameters.
In UE4 it can be done via Rotating Movement Component in blueprint.

Blueprint example

Create a new blueprint from Actor class.

Open Components tab and add:

  • Rotating Movement Component
  • Static Mesh Component (Movable)

BRMC 1.jpg

Select Rotating Movement Component and look at Details panel. Here you can see its parameters.

BRMC 2.jpg

Rotation Rate - rotator, which specifies rotation speed in degrees per second.
Pivot Translation - vector, which specifies rotation pivot local offset.
Rotation in Local Space - boolean, which specifies is rotation in local or world space.

Open Graph tab -> Construction Script

Create next editable variables:

  • Rotation Rate (Rotator)
  • Pivot Translation (Vector)
  • Rotation in Local Space (Bool)
  • Mesh (Static Mesh)

BRMC 3.jpg

So, for now we need to setup blueprint to change mesh and adjust rotation parameters when it is already in level.

Drag and drop Static Mesh (component) and Mesh (variable) one by one into Construction Script graph selecting Get.
Drag Static Mesh (component) pin and find Set Static Mesh node.

BRMC 4.jpg

Using Set Static Mesh node and Mesh (variable) set new mesh into Static Mesh Component

BRMC 5.jpg

Now, get Rotating Movement component, drag its pin and find Set functions for its variables - Rotation Rate, Pivot Translation, Rotation in Local Space.

BRMC 6.jpg

And using early created correspond variables set new parameters for rotating movement.

BRMC 7.jpg

Compile and save blueprint. Place it in your level, select and look at Details panel. Here you can find and adjust all parameters we told about.

BRMC 8.jpg

On this simple preview mesh you can see how it works in comparison with old system.

X = Roll
Y = Pitch
Z = Yaw

BRMC 9.jpg