About : This tutorial will introduce the reader to the world of animated level geometry in UE3. Doors, elevators, and so on.
Target Audience : Unreal Engine 3 users - intermediate skill required
Platform : Unreal Engine 3 including RoboBlitz, GOW, and UT3
Last Update : Originally written in November 2006 - Updated in January 2008
A triggered object
This tutorial will explain the basics of animating meshes in the Unreal Engine 3. Those who have experience with previous Unreal Engines will notice that "movers" have changed quite a bit. They are much more powerful now and offer plenty of new possibilities. The new movers can have a lot of keys, much smoother movement and are easier to control. Setting up a mover however has become more complex. The controls for the mover are also hidden quite well in the matinee menu which is on its turn hidden in kismet, the visual scripting tool. This tutorial will also give a basic introduction to kismet as it is required to trigger the movers.
Movers can be anything. Doors, elevators, machines, and so on. For this tutorial we are going to make a moving plateau, call it an elevator if you want.
Create a basic cube or platform or just load up an existing map to start with.
The first thing you need to do now is to add the staticmesh you wish to animate as an interpolatingmesh. To do that select the desired mesh in the Generic Browser and while it is selected rightclick somewhere in the level and pick Add Actor -> Add InterpActor
After that add a trigger near or on top of it by rightclicking it again and choose Add actor -> Add trigger.
Next load up kismet (button with a green letter K - top toolbar) and make sure the trigger actor in the level is still selected. Rightclick somewhere in the Kismet window and select New Event Using Trigger_0 -> Touch.

Rightclick somewhere again and now choose New Matinee. Connect the trigger Touched node to the Play node of matinee (click on a little black square next to a word and drag to connect the two).

On the left side rightclick and choose New Group. The name for the group is irrelevant.
Update: In certain newer builds of the engine, namely UT3, you are required to rightclick in the lower panel to get to the New Group menu, instead of the left panel!



Where the end is located is very important because UnrealEd does not stop once it went past the key you set. It will continue until it hits the End line. In other words: If your last key is on five seconds but the red line is at 15 seconds your elevator or door will open in five seconds and then pause for ten seconds until the End line is reached. In most situations you want to set the End line on the same location as the last key. You might think the End line is great to make the mover pause a while before it closes but there are better and more powerful ways of controlling the pause time. Therefore I prefer setting the End line around the last key.
After you set a second key be sure to leave the key selected and without doing anything else or closing anything at all go back to your level and move the elevator to its destination. Where you move it to will be remembered as its destination. Be sure to use the gizmo arrows to move the mesh, and not the shortcuts as a "feature" in certain builds may not register moves done with the shortcuts correctly.


Connect the Completed output of the Matinee node back to its own Reverse input. This will cause the elevator to return once to ground level once it reached the upper level.
You might also want to pause the elevator when it is at it's top position. The best way of doing so is to add a Delay node to kismet. Rightclick and choose Action -> Misc -> Delay. You can configure the actual delay in its properties (click it and look at the bottom of the Kismet window)
Break the Finished - Reverse connection you previously made by holding Alt on the keyboard and clicking on either Reverse or Completed. Next connect the Matinee's Completed output to the Start input of the Delay node and connect the Finished output of it to the Reverse input of the Matinee node.

Also note: a Matinee node can hold multiple movement tracks for multiple interpolatingmeshes. You don't need to make a new Matinee node for every piece of a complex mover as long as all pieces require the same amount of time/delay and trigger.
If your mover is not affected by lighting, you must open the properties of a nearby light, and enable the Dynamic channel in the LightingChannel section. Optionally you can also enable bCastCompositeShadow and bCastDynamicShadows to get dynamic shadows, although those might decrease performance.

(Picture from another tutorial)
Additionally, you can also enable the LightEnvironmentComponent, found in the properties of the InterpActor - DynamicSMActor - LightingEnvironment - LightEnvironmentComponent. The AmbientGlow properties in the section above it, lets you set the ambientcolor of the mesh.
You now have a basic but fully working elevator!
Elevators and doors in UT3
In UT3, a special Kismet Setup is available in for elevators. Select your Interpactor, and then go to Kismet and rightclick New Event - Physics - Mover.

This will create a predefined setup that does not require a trigger actor anymore. The player simply touching the interpactor itself, instead of the trigger actor, will now activate the interpactor.

Note how I added sounds to the elevator using Kismet actions, instead of the sound properties found within the properties of the Interpactor. This to gain greater control over how the sound is played, how loud, and when.
Doors in UT3 are a little bit bugged. If you were to simple set up a door with a single trigger, the door will sometimes either close too soon, or not at all. To my experience it helps adding a second trigger to the setup that acts as a backup for the first. The idea is to make the radius of the backup trigger far smaller than the main trigger, and to disable the backup trigger whenever the main trigger is activated. If however, the main trigger would become untriggered and there would still be a player inside its radius, the backup trigger would pop into action when the player would run into the much smaller second trigger, which in turn will kick the door into action. I haven't heard people complaining about the doors in my levels yet, so this might actually work.

The triggervolume is the backup trigger and is a very narrow volume real close to the door it is suppose to open. The gates prevent it from sending out any command as long as the regular trigger is active. The backup trigger must be disabled when the regular trigger is active to prevent players from triggering the door twice using two different triggers.
A continuously looping animation
Making a looping animation isn't very hard at all and can be great In he first and second Unreal Engine you had a special Loopmover class, forget that. In Unreal Engine 3 you use a regular Interpactor with some smart Kismet scripting.
Set your interpactor up the regular way. That means add the actor to the level, make a Matinee node in Kismet and give the element a movement track in it. After that return to Kismet and instead of adding a Trigger Event to it rightclick and New Event -> Level Startup. This kind of event will obviously force something to trigger as soon as the level starts up.
Next connect the Level Startup node to the Play input of the Matinee. Connect the Matinee's Completed output node to its own Reverse node and then connect the Matinee's Aborted output node to its own Play input node again.

Another way to create a looping animation is by simply enabling the bLooping property found in the Matinee node in Kismet. Both approaches will get you roughly the same result.
A continuously rotating animation
If you want to continuously rotate something, like the wheel of a machine, a wind mill and so on, you are not even required to use Kismet.
Simply place a mesh as an Interp actor in a level, and open up its properties (F4). Expand the section Movement and go to the sub section RotationRate. Set a number to any of the axis. This is the amount of rotation the mesh will make per second, a higher number means a higher speed.
Next, return to the main Movement section, and change the property Physics from the default PHYS_Interpolating to PHYS_Rotating.
That's it!
Attaching something to a mover
Place two Interp actors, and open up the properties of the Interp actor you wish to attach to the other one (so select the child mover). Expand the section Attachment, and type in the name of the other mover in the property Base. If the other mover is named InterpActor_47, retype that name in the Base property. The name of the selected actor is always displayed at the titlebar of the properties window.
Done!





