Your first prop
A Pulse prop is an object made of parts that move, change state and play small events, without animation assets or Blueprints. In this lesson you build a small machine from the basic shapes of the engine: a base, a wheel that turns and an arm that moves while it works. Why: Props.
The basic shapes are in the Content Browser under Engine > Basic Shapes. If you do not see the folder Engine, turn on Show Engine Content in the settings of the Content Browser.
Create the prop
Open the Pulse window (Tools > Pulse > Pulse), choose Foundation, open Create and click Prop. Name the asset DA_Prop_Machine and double click it: the prop editor opens with Parts on the left, the Viewport in the middle, Details on the right and the Timeline at the bottom.
Add the parts
Drag Cube from Engine > Basic Shapes onto the empty space of Parts: it becomes the root part. Drag Cylinder onto the row of the cube and then another Cube onto the row of the first cube: both hang on the first cube. Press F2 on each row and name them Base, Wheel and Arm. Why: Parts.
In the Viewport (Build mode, key 1) give each part its place with the gizmo (W move, E turn, R scale): a flat Base, the Wheel upright on its front (turned 90 degrees about X, so its axle points along Y) and a thin, tall Arm on top. With Snap on in the bar of the viewport, a part you drag near a socket of a mesh hangs on that socket; the basic shapes have none, so here the parts hang on their parent part.
Set the wheel’s pivot
A part turns about its pivot. Select Wheel, turn on Move Pivot Only (P) in the toolbar and drag the pivot onto the axle in the middle of the wheel; the mesh stays where it is. You can also type it as Pivot in Details, in the mesh’s own space (0, 0, 0 is the middle of the engine cylinder). Do the same for Arm and put its pivot at its lower end (0, 0, -50), so it moves like a hinge.
Add a Spin and a Swing
Select nothing to see the prop in Details. Add two entries to Motions:
- Part
Wheel, TypeSpin, DriveWork, Axis (0, 1, 0), Amount 360: one turn per cycle. - Part
Arm, TypeSwing, DriveWork, Axis (0, 1, 0), Amount 20, ShapeSine.
Click Play in the bar of the viewport: the wheel turns and the arm rocks. Why: Motions.
Add the states Idle and Working
Add two entries to States of the prop: Idle with Rate 0 and Working with Rate 1. Set Start State to Idle. Work motions run with the rate of the state, so the machine stands still in Idle and moves in Working. Pick the state in the bar of the viewport to see both. Why: States.
Key the arm in Animation mode
Add a third entry to Motions: Part Arm, Type Keyframes, Drive Work. It is a clip of property tracks, Duration seconds long, that plays once per repeat of the cycle. Switch to Animation (key 2, red frame), open the tab Motions of the Timeline and pick Working in its bar. Select Arm, move the playhead to the middle of the clip and turn the arm a little with the gizmo (E). The gizmo keys only what you changed: it makes the Rotation track of the clip, and its first key also adds rest keys at the start and the end, so the loop closes. The chip in the viewport says what it keys.
Open the row of Arm on the timeline (the arrow): the track Rotation shows its keys. Its key button sets or removes a key at the play position (S keys the selected tracks), comma and period jump to the previous and next key, and the right click menu of a key sets Smooth, Linear or Step. + Track on the row of the part adds a track of another property, such as Scale or Opacity. Why: Keyframes and Prop editor.
Add the event Puff
Drag Sphere from Basic Shapes onto the row of Base, name it Puff, make it small, put it on top of the base and turn off Visible. Drag a short sound onto the row of Base, name it PuffSound and set its Play to Event. Then add an entry to Events of the prop:
- Name
Puff, ReplicationLocal Same: every machine plays it at the same times without network traffic. - In Triggers one entry with Type
Random, Min Interval 3 and Max Interval 6.
Open the tab Events of the Timeline and pick Puff. Right click the track of Puff and add Show Part at 0 and Hide Part at 0.5; right click the track of PuffSound and add Start Part at 0. Turn on Simulate in the toolbar to see the random trigger at work. Why: Events and Multiplayer.
Run Check and look at Cost
Click Check in the toolbar. It plays every motion, blend and event and lists in the tab Check the parts that go into each other. If it lists a hit, click it, then move the arm away from the wheel or lower the Amount of the Swing. Then open Cost in the toolbar: parts, draw calls and triangles of the prop, and a line per distance level. Pick Far in the Level list of the toolbar: the prop as it looks from 60 m, where the wheel and the arm stand still. Why: Check, Distance levels and Levels and cost.
Place it and switch the state
Save the prop. Open a level with a floor, drag a Pulse Prop Actor from Place Actors into it and set its Prop to DA_Prop_Machine (on an actor of your own, add the Pulse Prop component instead). Select the actor, open the Level Blueprint and right click to create a reference to it. From Event BeginPlay add a Delay of 3 seconds, then Get Prop Component of the actor and Set State with State Working. Press Play: the machine stands still, puffs now and then and starts working after three seconds. Why: Runtime and editor.
Result
A machine made of three basic shapes turns its wheel, moves its arm and puffs at random times, and Blueprint switches it from Idle to Working.
From here you can make the arm go up when the state changes: pick Working in the state menu of the viewport bar (in Build mode this is edit-state mode, purple frame; key 3 does the same) and turn the arm; the turn becomes an override of Working. Play transition from Idle on the tab States of the Timeline shows the blend. You can also make a prop from actors of a level with Prop from Selection, or hide the small parts far away in the matrix of Levels in the details of the prop, see Prop editor.