Overview

SkelControls allow you to modify a bone or set of bones in a skeletal mesh programatically. They are set up in the same tool as your animation blending - the AnimTree Editor. You cannot connect AnimNodes and SkelControls together - they are separate systems but displayed in the same workspace for convenience. Think of it as the Animation flowing into the root AnimTree box, and then the SkelControls allowing you to modify each bone in some way after that.

SkelControl Nodes

Name of the SkelController node and the name of the SkelController set by the user.

Output connector for this SkelController.

Strength slider, this allows you to set the strength of the SkelController.

Toggle which will blend the strength up or down using Blend In Time and Blend Out Time defined by the SkelController node.

Input connector for this SkelController.

Current strength of the SkelController

Adding a new SkelController

Say you want to add a controller to get the head of a character to look at a particular target:

1. Right click on the blue AnimTree box and choose 'Add SkelControl Chain':

2. A combo will pop up letting you pick what bone you wish to control. Note that you can only have one control chain for each bone:

3. Choose the Head bone and you will see a new green connector in the AnimTree labeled 'Head':

4. Right click on the background and create a new SkelControlLookAt:

5. Connect the SkelControlLookAt the to Head connector:

Modifying an existing SkelController

If you want to delete or change the bone for an existing skeletal bone chain; right click on the green box that is on the blue AnimTree box. A context menu then appears with the options to do those actions.

Chaining and sharing

SkelControls can be chained together, and are applied in the order that they are connected. So if you apply a SkelControlLookAt, followed by a SkelControlSingleBone adding some rotation, first the bone will look at the target, and the be offset by that rotation.

SkelControl can also be shared by multiple bones. So if you want many bones to point at the same target, you can use just one SkelControlLookAt and connect multiple bones to it.

Referencing SkelControl nodes in Unrealscript

SkelControls can be reference in Unrealscript in much the same way as Animation nodes. Each SkelControl node in the AnimTree has a Control Name property which can be set within the AnimTree.

To ensure that everything gets cleaned up by the garbage collector, it is also good practice to ensure that you remove reference to the SkelControls when the owning actor is destroyed.

Post Physics Controller - This SkelControl will be applied after the physics pass.

Set Strength From Anim Node - If true, the control strength will be the same as given AnimNode(s). This is to make transitions easier between nodes and Controllers.

Controlled By Anim Metadata - If true, the weight will default to zero and metadata in animation will enable the node based on the animation weight.

Invert Metadata Weight - If true, weight defaults to one and the metadeta will set that to zero, disabling the skeletal controller.

Propagate Set Active - If true, when this SkelControl is made active, the next one in the chain will be made active as well.

Strength Anim Node Name List - List of anim nodes which are polled to set this SkelControl's control strength. This is used in conjunction with Set Strength From Anim Node.

Bone Scale - Allows you to apply scaling to the bone and all child bones that the SkelControl is working on.

Ignore When Not Rendered - Do not apply this SkelControl if the mesh is not currently being rendered.

Ignore At Or Above LOD - Disables the SkelControl if the LOD on the Actor is above or at this value.

Most positions and rotations specified by SkelControls allow you to choose the 'space' (or 'reference frame') that it is defined in. Here is a brief explanation of the various options:

BCS_WorldSpace - As a location in the world.

BCS_ActorSpace - Relative to the Actor origin.

BCS_ComponentSpace - Relative to the Skeletal Mesh Component origin.

BCS_ParentBoneSpace - Relative to the reference frame of the parent bone of the bone that the SkelControl is controlling.

BCS_BoneSpace - Relative to the bone that the SkelControl is controlling.

BCS_OtherBoneSpace - Relative to another bone specified by the user in the skeleton hierarchy (there should be a BoneName option in the SkelControl to let you specify which bone).

Limb

SkelControlLimb

This control uses Unreal Engine 3's Inverse Kinematic solver. It takes a target location in world space, and attempts to rotate the two bones above the controlled one to reach that target. If the target is not reachable, the bone will be placed as close as possible. As well as specifying the target location for the end of the limb, you also specify a target for the joint to bend towards - this is the pink diamond in the 3D viewport.

Note that the Limb controller does not work if you have roll-bones in the hierarchy of the arm (ie if the lower arm is a child of the upper arm roll bone). You should build your skeletons so that the arm is composed of two bones, and not four bones. The following picture explains the problem.

The bones on the left are typical in 3D packages but aren't as efficient for real time skeletal controls. In this arm chain if you wanted to turn this into IK, you would have an IK chain of four bones, when you can get away with only two bones like the bones that are one the right in the above image. The roll bones are children of the arm bones in both situations. The difference is that the left is a straight hierarchy of four bones from the upper arm to the hand, while the right is a hierarchy of two bones from the upper arm to the hand.

Joint Target Space Bone Name - If Joint Target Location Space is BCS_OtherBoneSpace, this is the name of the bone to use.

Bone Axis - The axis of the bones in the limb that point along the bone.

Joint Axis - The axis of the bone that should be aligned with the joint axis. So for an elbow - this should be the axis around which the elbow bends.

Invert Bone Axis - Whether the Bone Axis vector should be inverted.

Invert Joint Axis - Whether the Joint Axis vector should be inverted.

Maintain Effector Rel Rot - If true, modify the relative rotation between the end effector bone and its parent bone. If false, the rotation of the end bone will not be modified by this controller.

How to use in Unrealscript

In this example, a simple animation is done using SkelControlLimb; which is a pawn lifting some weights. Using SkelControlLimb, a world space location is set as the destination for the hands. Dynamic triggers is used to mark the location where the hands should go. As the iron bar moves up and down using Matinee, the dynamic triggers move along with it as they are attached. Once per tick, the SkelControlLimbs are updated, setting the Effector Location to the same location as the dynamic triggers.

SkelControlFootPlacement

This is a special type of SkelControlLimb that is designed to place the feet of a character properly on the ground. You should attach this control to the foot bone of your character. A line check is performed each frame from the position of the hip bone to the position of the foot bone. If nothing is hit, the leg is not changed. If something is hit, the Effector Location for the control is set to the hit point, so the leg will bend to place the foot on the ground. Because the Effector Location is generated automatically, you cannot modify it using the widget in the control, but you can modify the Joint Target Location to get the legs to bend in the correct direction.

Properties

Foot Offset - Offset applied to the generated Effector Location to pull it back along the line test. This allows you adjust the height of the foot on the ground, as the foot bone is not usually at the sole of the foot.

Foot Up Axis - The axis of the foot bone to align to the surface normal if Orient Foot To Ground is true.

Foot Rot Offset - Additional rotation applied to foot when Orient Foot To Ground. This can be required if the foot bone does not have an axis that points up.

Invert Foot Up Axis - If we should flip the Foot Up Axis.

Orient Foot To Ground - If we should rotate the foot bone so that it aligns itself with the surface normal that was hit by the line check.

Max Up Adjustment - The maximum amount up the foot will be moved by the SkelControl.

Max Down Adjustment - The maximum amount down the foot will be moved by the SkelControl.

Bone Axis - Axis of graphical bone to align along the length of the bone.

Joint Axis - Axis of graphical bone to align along the hinge axis of the joint.

Invert Bone Axis - Set true if you want to invert Bone Axis when constructing the transform for the bones.

Invert Joint Axis - Set true if you want to invert Joint Axis when constructing the transform for the bones.

Rotate Joint - Experiment to Rotate Joint bone, rather than creating a new matrix for it.

Maintain Effector Rel Rot - If true, modify the relative rotation between the end 'effector' bone and its parent bone. If false, the rotation of the end bone will not be modified by this controller.

Take Rotation From Effector Space - If true, rotation of effector bone is copied from the bone specified by EffectorSpaceBoneName.

In the AnimTree Editor you can display a preview floor mesh for testing foot placement. Press the Show Floor button on the tool bar and the floor mesh will appear. You can move and rotate the floor by holding the Control key and using the following controls:

Left Mouse Button - Translate floor along X and Y.

Right Mouse Button - Rotate floor around Z.

Left + Right Mouse Button - Translate floor along Z.

Advanced Foot Placement

While the foot placement SkelController node does most of the work for you, there are often a lot of situations where you will need to tweak and change the foot placement SkelController node so that it works accordingly to the scene.

Mesh Offsetting

Animations are authored on a flat ground, so if the character is stepping on something higher than the ground, the foot placement code will raise the foot, and everything will look fine. Now if the collision happens below the animated ground level, for example going down stairs, then either the foot will remain in the air, or the leg will over extend to reach the step below. This is not very good. So typically the game play code would look at the smallest distance to the actual floor from both feet, and move the mesh with that offset, and a bit of interpolation may help to keep things smooth.

As you can see, the collision of the pawn has positioned it so it is at the right level, but it would also mean that pawn would look like it's floating. To correct that, a translation was put on the mesh to force it down. From there foot placement handles the rest.

This method also works well on slopes.

Code logic simply performs a trace down using the X and Y location of the sockets that have been attached to the left and right foot bones. The Z location is the pawn's location to ensure that the traces don't penetrate through the floor that the pawn is standing on. If the hit locations have been found, the appropriate mesh translation vector is calculated and then passed to the mesh. If no floors were detected (perhaps the pawn is swimming?) then the mesh translation is not applied this tick. The whole process is also aborted if the pawn is falling.

This is a simple method for ensuring that the mesh is in the correct position to ensure that the foot placement SkelControls will work well. However, this method is fast but does not work that well when the pawn is moving or doing complex behavior.

Foot Placement while moving

One way to achieve foot placement while moving (and not just when standing still) is to take into account the offset (height) between the foot bone, and the animated ground level (which is usually represented by the Root Bone position). Now instead of moving our Foot Bone to where the ground actually is, we just add an offset to the Foot Bone, being the difference between the animated ground height and the actual ground height. Now the animation will properly lift the foot and follow the world. It will require a bit of interpolation, smoothing, and mesh offsetting love to look good, but it is a fairly simple solution to put in place and works fairly well. That system will also tend to lag a little bit as you are monitoring the ground level just below the feet. One way to improve this would be to look ahead where the foot would land, but that would require a more complex system in place which analyzes the locomotion animations to properly predict where the feet will land. Below are screenshots of the system prototyped using the Gears of War 2 code.

Floor Conforming

Floor Conforming is orienting the character and/or his legs against the slope, so his feet move parallel to the slope. A simple way to achieve this is by having an IK Foot Bone Setup in the character's skeleton. Basically an "IK Foot Root" bone coming of the "Root Bone", and "IK Foot Right", "IK Foot Left" bones matching the foot bones exactly at every frame of animation. Then by translating and rotating the "IK Foot Root" bone, it is pretty easy to orient the feet movement against the direction of the slope. Again, some interpolation and mesh offsetting is required for it to look smooth. Additionally, the whole mesh can be rotated to adjust the torso of the character to the slope, and the change of slope, for it to look more natural. (Leaning a little into the slope when moving, and against the slope when stopping). Compensating for Mesh rotation in the aiming code is very easy to do, to keep the character aiming at a given point in space. Below are screenshots of the system prototyped using the Gears of War 2 code.

Moving Bases

When a character is standing on top of a moving base, or otherwise known as a Mover, if that Mover happens to be rotating, the character will appear to be sliding and completely disconnected from the ground. Doing the Floor Conforming system discussed above will help, but still the character will slide against the base, the feet won't appear grounded at all. Why is that? This is because Unreal uses an AABB (Axis Aligned Bounding Box) for Pawn collision. So that box does not rotate with the Mover. And worse, it is pushed upwards and downwards as the Mover rotates. With a bit of maths though, it is possible to figure out where the feet lie and do the necessary compensations. You also have to ensure that the Mover is ticked before the Pawn. Below are screenshots of the system prototyped using the Gears of War 2 code.

Recoil

GameSkelControl_Recoil

This SkelControl simulates the force applied to arms when a weapon is fired. While the same effect could be done using animations, the advantage of using this SkelController is that it allows you to pair it with other SkelControls. Often with this node, you will only want it to affect a single bone, in this case the b_IK_Gun. SkelControlLimb is then used on the left and right hand bones to perform inverse kinematics on the hand bones attached to b_IK_Gun.

Properties

Bone Space Recoil - If true, aim is ignored and recoil is just applied in local bone space.

Play Recoil - Toggles activation for the recoil.

Recoil - Recoil information.

Time Duration - Duration in seconds of the recoil shake.

Rot Amplitude - Rotation amplitude vector.

Rot Frequency - Rotation frequency vector.

Rot Params - Rotation parameters.

Loc Amplitude - Location offset amplitude vector.

Loc Frequency - Location offset frequency vector.

Loc Params - Location parameters.

Aim - Aim vector represented as [-1.f, 1.f : -1.f, 1.f]

How to use in Unrealscript

In this example, the pawn will fire the link gun every 0.2 seconds and the arms will recoil due to the firing of that weapon.

SkelControl_Handlebars

This controller is designed to work with Unreal Engine 3's vehicle system. This controller looks up the rotation of a wheel that has been modified by a SkelControlWheel, and adjusts it's controlled bone accordingly. This makes it easy to setup an automated steering wheel for example.

Properties

Wheel Roll Axis - Axis around which the wheel rolling occurs.

Handlebar Rotate Axis - Axis around which steering occurs.

Wheel Bone Name - Name of the bone whose rotation will control the steering.

Invert Rotation - Inverts the rotation to apply to the controlled bone.

SkelControl_Multiply

This controller allows you to multiply the results of previous skeletal blends.

Properties

Multiplier - Float which represents how much to multiply the previous skeletal blends by.

SkelControl_TwistBone

This controller was made to handle twist/roll bones procedurally. It looks at the rotation of Source Bone Name between its animated and reference pose, and applies the rotation with a scale to the roll bone.

Properties

Source Bone Name - Source bone name to look at. If you were using the left fore arm bone as the source for this SkelControl then you would set this to the left hand bone.

Twist Angle Scale - How much to scale the rotation angle by.

SkelControlWheel

This controller is designed to work with Unreal Engine 3's vehicle system. Vehicles use SkeletalMeshes with a bone for each wheel. Before the wheels will move and steer in the game you must create a SkelControlWheel for each one, give it a name, and then use that name to identify the control in the vehicle set up. The vehicle system will then update the control each frame to make the wheel match the vertical movement, roll and steering of the underlying simulation. The Steering and Throttle variables stored within Vehicle are used to determine the state.

Properties

WheelDisplacement - This is just for previewing the vertical movement of the wheel. Setting this number should raise the wheel.

WheelMaxRenderDisplacement - This is the maximum vertical distance that the wheel will be moved. This is used to ensure the wheel will never clip into chassis geometry.

WheelRoll - Similar to WheelDisplacement, this is used to preview the wheel rolling. A positive value should make the wheel roll as if the car is moving forwards.

WheelRollAxis - Which axis of the wheel bone the wheel should roll about.

WheelSteering - Used to preview steering movement of the wheel. A positive number should move the wheel to point to the right.

WheelSteeringAxis - The axis of the wheel bone that the wheel should rotate about to steer.

InvertWheelRoll - Invert rotation for the roll.

InvertWheelSteering - Invert rotation for the steering.

UDKSkelControl_Damage / UTSkelControl_Damage

This controller is designed to work with Unreal Engine 3's vehicle system. As vehicles become damaged, this skeletal controller creates the visual aspects of the vehicle breaking up. For example, you can damage parts of the vehicle and static meshes will break off. This is mostly an automatic skeletal controller, however you can subclass this skeletal controller to override BreakApart, BreakApartOnDeath and RestorePart.

Variables exposed in Unreal Editor

On Damage Active - Whether the OnDamage functionality is active.

Damage Bone Scale - Value to scale this bone to on damage.

Damage Max - How much damage the skeletal control can take before death.

Activation Threshold - If the health target is above this threshold, this control will be inactive.

Control Str Follows Health - Once activated, does this skeletal controller generate the control strength as a product of the health remaining, or is it always full.

Break Mesh - The static mesh to spawn when the skeletal controller breaks.

Break Threshold - The threshold at which the spring will begin looking like it is going to break.

Break Time - This is the amount of time to go from breaking to broken.

Default Break Dir - When breaking off, use this to build the vector.

Damage Scale - The scale to use for the spawned piece. (i.e. we have one static mesh asset but it is being spawned from different locations on a vehicle which is mirrored down the center.).

PS_Damage On Break - Particle system to spawn when this part breaks.

PS_Damage Trail - Particle system to attach when this part flies off. (e.g. a dark acrid trailing smoke trail!).

Break Speed - Force that pushes the part up when the part is broken off to clear the vehicle.

On Death Active - Whether the OnDeath functionality is active.

On Death Use For Secondary Explosion - Whether the OnDeath functionality is active for the secondary explosion.

Death Percent To Actually Spawn - This is the percent that this piece will actually spawn if OnDeath is active.

Death Bone Scale - Value to scale this bone to on death.

Death Static Mesh - The static mesh to spawn on death.

Death Impulse Dir - The direction which the spawned vehicle piece will fly off in.

Death Scale - The scale to use for the spawned piece. (i.e. we have one static mesh asset but it is being spawned from different locations on a vehicle which is mirrored down the center.).

This controller is used by Unreal Tournament 3's hover board, for simulating vibrations.

Properties

Vib Frequency - Frequency used to simulate the vibration.

Vib Speed Amp Scale - Used for amplifying the vibration based on the linear velocity.

Vib Turn Amp Scale - Used for amplifying the vibration based on the angular velocity.

Vib Max Amplitude - Used for constraining the vibration to a maximum amplitude.

UDKSkelControl_HugGround / UTSkelControl_HugGround

This controller tries to keep a bone within a certain distance of the ground within its constraints. It does this by casting a line check down to find the world hit location. It then translates the bone, this can give the appearance of things that always sit on the ground.

Properties

Desired Ground Dist - Desired distance from the bone to ground.

Max Dist - Maximum distance the bone may be moved from its normal location.

Parent Bone - Optional name of a bone that the controlled bone will always be rotated towards.

Opposite From Parent - If true, rotate the bone in the opposite direction of the parent instead of the same direction.

XY Dist From Parent Bone - If ParentBone is specified and this is greater than zero always keep the controlled bone exactly this many units away from it.

Z Dist From Parent Bone - If ParentBone is specified and this is greater than zero always keep the controlled bone exactly this many units away from it.

Max Translation Per Sec - Maximum amount the BoneTranslation may be change per second.

UDKSkelControl_PropellerBlade

This controller is used with Unreal Engine 3's vehicle system. This controller is only applied to vehicles that extend UDKVehicle. While the vehicle is being driven, it will simulate propeller blades spinning up. This effect is only applied to the bone's rotational yaw value.

Properties

Max Rotations Per Second - Defines the maximum rotation rate the propeller can spin at.

Spin Up Time - Time to spin up to the maximum rotation rate.

Counter Clockwise - Set true if you wish to spin the propeller blade counter clock wise.

UDKSkelControl_Rotate / UTSkelControl_Rotate

This controller allows you to define the desired bone rotation. It also allows you to define the rotation rate, which controls the speed the bone should rotate at when rotating to the desired bone rotation. This simplifies animating bone in Unrealscript by simply defining the desired bone rotation.

UDKSkelControl_SpinControl / UTSkelControl_SpinControl

Properties

Degrees Per Second - Defines how many degrees to spin the bone per second.

Axis - If all of the values of the axis are zero, then this controller does nothing. Axis is normalized, so the bone does not spin any more than the Degrees Per Second.

X - Spins the bone on the X axis. You may use a negative value to spin counter clock wise.

Y - Spins the bone on the Y axis. You may use a negative value to spin counter clock wise.

Z - Spins the bone on the Z axis. You may use a negative value to spin counter clock wise.

UDKSkelControl_TurretConstrained / UTSkelControl_TurretConstrained

This controller works with Unreal Engine 3's vehicle system to attempt to rotate the connected bone to face the rotational specified in Desired Bone Rotation. This is extended with many options to constrain the turret's movement.

Properties

Constrain Pitch - If true, then the pitch will be constrained.

Constrain Yaw - If true, then the yaw will be constrained.

Constrain Roll - If true, then the roll will be constrained.

Invert Pitch - If true, then the pitch will be inverted.

Invert Yaw - If true, then the yaw will be inverted.

Invert Roll - If true, then the roll will be inverted.

Max Angle - Maximum angle in degrees.

Pitch Constraint - Maximum pitch constraint.

Yaw Constraint - Maximum yaw constraint.

Roll Constraint - Maximum roll constraint.

Min Angle - Minimum angle in degrees.

Pitch Constraint - Minimum pitch constraint.

Yaw Constraint - Maximum yaw constraint.

Roll Constraint

Steps - Allow each turret to have various steps in which to contrain the data.

StepStartAngle - If the current angle, in degrees, is equal or above this; then this step is activated.

StepEndAngle - If the current angle, in degrees, is equal or below this; then this step is activated.

MaxAngle - Maximum angle in degrees.

Pitch Constraint - Maximum pitch constraint.

Yaw Constraint - Maximum yaw constraint.

Roll Constraint - Maximum roll constraint.

MinAngle - Minimum angle in degrees.

Pitch Constraint - Minimum pitch constraint.

Yaw Constraint - Minimum yaw constraint.

Roll Constraint - Minimum roll constraint.

Lag Degrees Per Second - How long, in seconds, does the turret lag behind when updating its rotation to the desired rotation.

Pitch Speed Scale - Pitch speed modifier.

Desired Bone Rotation - Desired rotation the bone should rotate to.

Fixed When Firing - If true, this turret won't update if the seat it is associated with is currently firing.

Associated Seat Index - The seat index this control is associated with.

Reset When Unattended - If true, this turret will reset to 0, 0, 0 when there isn't a player controlling the turret.

Unrealscript functions

OnTurretStatusChange(bool bIsMoving) - Delegate which is called when the turret's status changes.

bIsMoving - True if the turret is moving.

InitTurret(Rotator InitRot, SkeletalMeshComponent SkelComp) - Initialises turret, so its current direction is the way it wants to point.

UDKSkelControl_VehicleFlap

This controller uses the Unreal Engine 3's vehicle system to provide animation for flaps that animate based on the vertical velocity of the vehicle. This is used for Unreal Tournament 3's Manta vehicle to animate the back flaps as it jumps.

Properties

Max Pitch - Maximum pitch change in both directions that can be applied to the bone.

UTSkelControl_CicadaEngine

This controller is used by Unreal Tournament 3's Cicada vehicle to move the engines to simulate how the vehicle flies. It uses the vehicles velocity to calculate the desired pitch of the bone.

UTSkelControl_JetThruster

The controller updates its control strength based on the thrust if the vehicle owner. Acto's must subclass UDKVehicle in order to use this controller. This can be useful for automatically scaling bones based on the thrust of the vehicle for example.

UTSkelControl_MantaBlade

UTSkelControl_MantaFlaps

UTSkelControl_Oscillate

This controller moves a bone's translation back and forth at a steady pace. The maximum and minimum amount to translate is define as a single value called MaxDelta; with the minimum amount being the negative value of this value.

Properties

Max Delta - Maximum amount to move the bone.

Period - The amount of time it takes to go from the starting position (no delta) to MaxDelta.

Current Time - Current time of the oscillation. This normally does not need to be adjusted in Unreal Editor however.

Uncategorized

SkelControl_CCDIK

This is another type of IK, called CCD (Cyclic Coordinate Descent). It is basically a more brute force method that works with any number of bones, by slowly adjusting them one by one until the goal is reached. Because of the nature of this algorithm, it can be very slow for long chain of bones. It is mostly suited for tentacle like bone chains.

Properties

Num Bones - Number of bones to affect.

Max Per Bone Iterations - Performance control, number of times we're allowed to touch each bone.

Precision - Distance in Unreal Units to consider goal reached. Obviously if you can tolerate some error, it will help the performance of this node.

Start From Tail - Start from front or back of chain. Gives different visual results.

SkelControlLookAt

This is a controller used for adjusting the rotation of a bone so that it points at a particular target. You could use this for example to make a characters head look at a specified target. In the screen shot below, the head is looking at the blue diamond. The green cone indicates the maximum range that the head is allowed to move.

Properties

Target Location - The location in space that the bone should point at.

Target Location Space - The space that Target Location is defined in.

Target Space Bone Name - If Target Location Space is BCS_OtherBoneSpace, this is the name of the bone to use.

Look At Axis - The axis if the controlled bone that should point at the target.

Invert Look At Axis - Tells the Look At Axis to point away from the target instead of at it.

Define Up Axis - If this is false, the control will find the minimum rotation required to point the Look At Axis at the target. The roll around that axis will still be coming from the animation. If this is true, the vertical axis for the bone is defined as well, so the orientation of the bone is then completely defined by the controller.

Up Axis - If Define Up Axis is true, this is the axis of the bone that should point up in world space.

Invert Up Axis - If the Up Axis should point down rather than up.

Enable Limit - If we should limit the maximum angle that the bone is allowed to rotate to track its target.

Show Limit - If we should draw the green limit cone in the 3D view port when this control is selected.

Max Angle - The maximum angle, in degrees, away from the reference pose that this bone is allowed to be rotated.

Dead Zone Angle - If the target is within the dead zone angle of the current rotation, then an update won't occur. The bone will only be rotated if the target moves further out of the dead zone.

By setting TargetLocationSpace to BCS_OtherBoneSpace, you can for example make a character always look at his hand.

How to use in Unrealscript

In this example, a pawn will look at you (to be exact, the pawn that you are controlling). When you move out of its view range, it will then blend back so that the pawn is looking forwards.

SkelControlSpline

The spline controller does not the modify the bone itself, but takes a chain of bones above that bone and fits them to a spline. In the example below, we are using a normal SkelControlSingleBone to move the end of the chains up. Then the SkelControlSpline is set to modify the four bones above this - so creates a spline between the start and end of the chains. Note that this control does not maintain bone lengths.

Properties

Spline Length - The number of bones to walk up the hierarchy and modify to fit to a spline.

Spline Bone Axis - The axis of the bones to point along the spline.

Invert Spline Bone Axis - If the Spline Bone Axis should be flipped.

End Spline Tension - Controls the curvature at the end of the spline (near the controlled bone).

Start Spline Tension - Controls the curvature at the beginning of the spline.

Bone Rot Mode - Controls how the bones are rotated along the length of the spline. More info below.

The BoneRotMode setting lets you control how the bones along the spline are rotated by this controller:

SCR_NoChange - The rotation of the bones is not modified, they are just translated to sit on the spline.

SCR_AlongSpline - The bones are rotated so their SplineBoneAxis points along the spline.

SCR_Interpolate - The rotation of each successive bone is a blend between the rotation of the bones at either end of the chain.

This control using the SCR_Interpolate setting can be useful when controlling the rotation of a bone at the top of the back, to smooth the rotation along the rest of the bones in the spine.

SkelControlTrail

The trail controller modifies a chain of bones so that appears as if they trailing behind the head bone, which is Chain Length number of bones away from the controlled bone. It's useful when you have things such as ribbons, flags or chains attached to other bones that animate according to animation data. This effect can also be achieved using physical animation; but this method has more control.

Properties

Chain Length - Number of bones above the controlled one in the hierarchy to modify.

UDKSkelControl_CantileverBeam / UTSkelControl_CantileverBeam

This controller creates a spring to simulate cantilever beams, such as a vehicle antenna.

Properties

Initial World Space Goal Offset - From the initial bone, where to go to get the starting location for World Space Goal (in local bone space).

Spring Stiffness - Defines the stiffness to apply on the spring simulation.

Spring Damping - Defines the dampening to apply on the spring simulation.

Percent Beam Velocity Transfer - How much we want the tip of the beam to get of the base velocity.

Unrealscript functions

EntireBeamVelocity() - Returns the speed the entire beam is travelling at. (a delegate for cases like a tank, where we want the whole tank to effect less than the turret moving).

Detailed explanation

This Skeletal Controller requires some trickery on the Skeletal Mesh side of things to make it look like a flexible tube that is bending when "weight" is applied. The trickery involved is the way the vertexes are weighted in the skeletal mesh. The skeletal mesh has two bones. The position of the bones ultimately don't matter so much, but the root bone is below the branch bone.

So imagine this is a tube, with | representing segment breaks along the tube.

|====|====|====|====|====|====|====|

So the weight setting for Bone01 (root) is:

0.f, 0.125f, 0.25f, 0.375f, 0.5f, 0.625f, 0.75f, 0.875f, 1.f

And the weight setting for Bone02 (branch) is:

1.f, 0.875f, 0.75f, 0.625f, 0.5f, 0.375f, 0.25f, 0.125f, 0.f

What needs to happen next is that you use the Skeletal Controller on Bone02. Now the skeletal controller itself seems to have a Look At Target which you can adjust in the AnimTree. If the Spring Stiffness and
Spring Damping is set to some values then it tries to return the Look At Target to Initial World Space Goal Offset. This usually set to the top of the tube; but it can be set at a different place if a different effect is required.

Once you've done that you've got this flexible tube that bends as the Target Location is moving around. Because of the spring settings, it tries to return to its initial position.

UDKSkelControl_LockRotation / UTSkelControl_LockRotation

This controller locks one or more components of the bone's rotation to a specified value. This controller's effects is not viewable within the AnimTree Editor preview window.

Properties

Lock Pitch - Locks the pitch component of the bone rotation to affect.

Lock Yaw - Locks the yaw component of the bone rotation to affect.

Lock Roll - Locks the roll component of the bone rotation to affect.

Lock Rotation - The rotation to lock to.

Max Delta - The maximum amount the original rotation can be altered to reach Lock Rotation.

Lock Rotation Space - The space that rotation is in.

Rotation Space Bone Name - Name of bone used if LockRotationSpace is BCS_OtherBoneSpace.

UDKSkelControl_LookAt / UTSkelControl_LookAt

This controller that rotates a single bone to look at the desired target location. This controller extends SkelControlLookAt to add per-axis rotation limits and to also automatically interpolate to the desired target location.

Properties

Limit Yaw - If true, then apply limits to the yaw axis. Otherwise limits are ignored.

Limit Pitch - If true, then apply limits to the pitch axis. Otherwise limits are ignored.

Limit Roll - If true, then apply limits to the roll axis. Otherwise limits are ignored.

Yaw Limit - Angular limits, in degrees, for the yaw axis.

Pitch Limit - Angular limits, in degrees, for the pitch axis.

Roll Limit - Angular limits, in degrees, for the roll axis.

Show Per Axis Limits - If true, then draw a cone representing the per-axis limits.

UDKSkelControl_MassBoneScaling / UTSkelControl_MassBoneScaling

This controller provides a cleaner and more efficient way to handle scaling for many bones in a skeletal mesh.

Properties

Bone Scales - Scales for the bones in the skeletal mesh. The indices of this array match the skeletal meshes bone indices. To find out a bone's index, you can look this up by opening the AnimSet Editor for the skeletal mesh in question. This bone index is listed in the number next to the bone name.

Unrealscript functions

SetBoneScale(name BoneName, float Scale) - Sets the scale of a bone by name. This controller must be hooked up to the specified bone in the AnimTree for this to have any effect.

Bone Name - Name of the bone to affect.

Scale - Scale of the bone to affect.

GetBoneScale(name BoneName) - Returns the scale this control has for the given bone. This does not take into account any other controllers that are affecting the bone's scale.