No announcement yet.

Animating A Mesh Along A Path?

  • Filter
  • Time
  • Show
Clear All
new posts

    Animating A Mesh Along A Path?

    Hi all. Quick question.

    I am building a level that has some mesh elements I would like to have animated along a path. Think train car running on an endless loop.

    I remember seeing a matinee tutorial that showed how to make a path for a camera to follow, but I wondered if you could make a mesh follow it insted? Ideally also controlling yaw, pitch and roll.



    More Than 8 KeyFrames

    As is, Movers can only have up to 8 different KeyFrames, but using a simple trick and a little bit of smoke and mirrors, you can have a Mover with as many KeyFrames as you desire, but with one catch; you can only use it once per level. In this section you will see how to make a short roller coaster ride that has many more than 8 Keyframes but which will unfortunately only be able to be triggered once.


    One Roller Coaster Car Mover of your choice for your Main Mover
    One Low Poly Mover that has an obvious front (like a triangle) for a Mover Guide

    For this example map a car model is used for both of the Movers but for the Mover Guide, the display size has been reduced to distinguish between the two.

    Setting up Mover Guides

    First we’re going to set up a path of Mover Guides that our roller coaster car will follow. Think of these Mover Guides as KeyFrames for the KeyFrames. Once we have the properties of each of the Mover Guides set we will place them in the path that you want your Main Mover to travel but each Mover Guide will have their basic 8 KeyFrames to get to the next Mover Guide. Before we set that up though, let’s assign all of their properties we can at one time.

    Add your Low Poly Mover to your level and then set the following properties in its properties window

    Advanced --> bHidden: True
    Collision --> Set all of the values to False
    Events --> Tag: “MoverGuideName” (named MG in this map)
    Movement --> AttachTag: ”MoverGuideName”
    Mover --> MoverGlideType: MoveByTime
    Mover --> NumKeys: 8 (assuming you want all 8 KeyFrames per Mover Guide)
    Mover --> bTriggerOnlyOnce: True
    Mover --> bUseShortestRotation: True
    MoverEvent --> OpenedEvent: ”MoverGuideName”
    Object --> InitialState: TriggerOpenTimed

    There are still a few more properties you have to set, but by setting all of the above properties at once, you save yourself a little time. Now we can begin placing the Mover Guides into the level. You can place them anywhere really since they won’t collide with anything, and since they are set to bHidden True you won’t be able them anyway. For simplicity’s sake, we’ll place them in the path of your Main Mover that we will be adding later.

    So set up the KeyFrames for your first Mover Guide starting at the position and orientation you want your Main Mover to be in and then change the following properties where n = the number of the Mover Guide starting with 0:

    Events --> Tag: “MoverGuideName” n (MG0 in this map)
    Movement --> AttachTag: ”MoverGuideName” n+1
    MoverEvent --> OpenedEvent: ”MoverGuideName” n+1

    The below image is what the example level looks like once all the Mover Guides are in place including a rough path of where all the KeyFrames will take the Main Mover.

    You could also vary the number of KeyFrames and MoveTimes for each Mover Guide to speed up and slow down the path of the Main Mover. Otherwise if you want a constant speed, you should space their KeyFrames equidistant from each other and do not alter the MoveTime.

    Setting up the Main Mover

    Now we are ready to place the Main Mover. Add the Mover that you wish to be the actual Mover that follows these Mover Guides and place it at the start of the chain of Movers. Now set the following properties for this Mover:

    Movement --> AttachTag: ”MoverGuideName”0 (same as the first Mover Guide’s Event Tag)
    Mover --> MoverEncroachType: IgnoreWhenEncroach
    Object --> InitialState: None

    Now, place a Trigger on the Main Mover or wherever you want the Trigger to be. Set its Events --> Event to be the name of your first Mover Guide (MG0 in this map), and you’ll have a functioning roller coaster! Go ahead and run your map to test it out.

    It is unfortunate that you can only trigger this series of Movers once, but if the bTriggerOnlyOnce field is left to be False, then once the Mover Guides finish their loop, then they will all travel backwards through their KeyFrames simultaneously.

    You could conceiveably duplicate your loop of Movers several times, placing them in the same circuit and have them loop for as many times as you care to duplicate the circuit. This solution is not ideal, but until Unreal allows more than 8 KeyFrames, this is the only solution.


      Movers in UT2004 aren't limited to 8 KF -- just use the properties window instead of the contextual rollout.

      yes, you can use Matinee to move Movers rather than the camera -- set Affect to AFFECT_Actor and the Affected Actor to your Mover. see CTF-NeonArena2K4 for an example. it has a number of objects moving along Matinee paths as well as the viewpoint itself.