Creating an Animation Rig and Multi-Aim Constraint
Last updated
Was this helpful?
Last updated
Was this helpful?
The first time the IK Component is added to an AI, there will be a warning message at the top of the IK component. Users can create an Animation Rig by pressing the Create New Rig button. This will automatically create a new rig object and parent it to your AI. You should then assign a name for the newly created rig. This rig will automatically be added to the Upper Body Rigs List of the IK Component.
Have the Multi-Aim Constraint object that was just created selected. It is recommended that the Min and Max Limits are set to 90. Assign your bone transform to the Constrained Object slot.
Your assigned bone transform on the Multi-Aim Constrain needs to have its Aim Axis and Up Axis assigned. These are based on the local directions of your assigned bone transform. Ensure Unity's Tool Handle is set to Local.
Using the reference below, assign your Aim Axis and Up Axis to the Multi-Aim Constrain.
For this AI's Head, it has its Aim Axis at -Y and the Up Axis is -X so you would then assign these to the Head Multi-Aim Constraint. You base its local directions to that of the global directions within Unity.
After you have finished this set up, your AI should be able to look at its Combat and Look At Targets. The below example is an AI looking at a Friendly player target. The Source Object is automatically managed by the IK Component.
You will need to create and name a new GameObject in the newly create Rig object. This object will be used to control the attached bone transform that the IK Component will use. Assign a to this object.