Igloo – Motion Capture Project
The motion capture project allows custom animation to be played back in a flexible way via Kismet. Always use MCRootMotionPawn.
- Master Slot Node Name – This is the name of the AnimSlot node in the AnimTree which plays back the animation. See AnimTree’TestHip.RuthChr_AnimTree’ for an example of how to set that up.
- Motion Slot Node Name – This is the name of the AnimSlot node in the AnimTree which plays back the motion of the animation. See AnimTree’TestHip.RuthChr_AnimTree’ for an example of how to set that up.
- Ground Raycast Socket Names – This is the name of the sockets to perform a ray cast downwards to check for the ground height. This allows the feet to be positioned correctly on the surface.
- Use Ground Tracing – If this is set true, then the pawn’s skeletal mesh will be placed on the surface.
- Vertical Offset – This is a float which allows you to adjust an offset to apply to the feet position.
- CachedSkelControls – This is a set of names of skeletal controllers which the pawn initializes to do things.
- Translation Bone – This is the bone name where translation of the pawn is calculated from.
- Constant Floor Z – If the pawn is not using ground tracing, then this is the constant height at which the pawn should sit on.
How to assign a skeletal mesh to MCRootMotionPawn
After placing an instance of MCRootMotionPawn within the level, double click on it to open the properties panel. Expand “Pawn”, then “Mesh”, then “Skeletal Mesh Component”. Select the skeletal mesh you wish to assign, and then press the left pointing green arrow in the Skeletal Mesh field to assign it.
You will also assign the Anim Tree Template and Physics Asset in the same way.
Making MCRootMotionPawn animate
Animation is controlled via Kismet. Open up Kismet and right click in the work space. Then hover over “New Action”, then “Motion Capture”. Select “Play Animation”.
You have to assign the pawn to play the animation on. To do this, select the MCRootMotionPawn in the Editor Viewport. Then right click in the Kismet work space. Select “New Object Var Using MCRootMotionPawn”. This creates a new Kismet object variable, with the MCRootMotionPawn as the reference. Left click and drag on the “Play Animation” purple box just under where it says “Pawn” on the node. Drag and release over your new Kismet object. Now the “Play Animation” Kismet node knows who should play the animation.
Selecting on “Play Animation” also brings up the Properties panel. From here you can adjust the various animation properties.
What Kismet events are available for MCRootMotionPawn?
To create a Kismet event for a MCRootMotionPawn, select your MCRootMotionPawn within the Editor Viewport. Then right click in the Kismet workspace; then hover your mouse over “New Event Using MCRootMotionPawn”. This brings up another menu.
- Anim Notify – This allows the Animation to specify an Anim Notify within the AnimSet to trigger a Kismet event.
- Animation Start – This Kismet event node allows you to detect when an animation starts. You can specify which animation names you wish to watch for.
- Animation End – This Kismet event node allows you to detect when an animation ends. You can specify which animation names you wish to watch for.
- Tick – This Kismet event is triggered every update. This allows you to perform Kismet actions all the time.
Scale Rate Based On Radius
This Kismet Action allows you to calculate the play rate based on how close an actor is to this MCRootMotionPawn. See B_TestBox_5 example on how to use this.
Set AnimNodeScalePlayRate Scale
This Kismet Action allows you to set the play rate of a MCRootMotionPawn. Anim Node Scale Play Rate Name defines the anim node scale play rate within the AnimTree to affect.
This Kismet Event allows you detect when users have not touched any controls for a while. Only one of these Kismet Events can be used at a time!
Get Camera Location And Direction
This Kismet Action outputs the camera’s location and direction.
This Kismet Action allows you to subtract two vectors.
This Kismet Action allows you to calculate the length of a vector.
Set Inactivity Focus
This Kismet Action allows you to decide what the user should focus on when inactivity has been detected.
Set Camera Zoom
This Kismet Action allows you to set the camera’s current zoom.
Get Socket Location And Direction
This Kismet Action allows you to get a socket’s location and direction.