Blueprint Rotating Movement Component

Overview 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 bluep...

Updated over 1 year ago Edit Page Revisions

Overview

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.png

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

BRMC_2.png

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.png

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.png

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

BRMC_5.png

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.png

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

BRMC_7.png

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.png

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

X = Roll
Y = Pitch
Z = Yaw

BRMC_9.png