FinalIK inverse dynamics plug-in learning

1.Full Body Biped IK component

global properties

FixTransform Refresh IK position (when this option is unchecked, drag the bone point and the character will move as if in space)

Weight represents the degree of application

Iterations How often other points are updated. When not in use, it can be changed to 0, so that when holding the hand, only manual operation is performed, and other parts will not be affected.

Body attribute                

UseThighs uses thigh muscles, checked by default, and the exercise will be gentler and softer.

Spine is the area of ​​the abdomen (thoracic cavity). The weight should be 1, so that when rotating and stretching, the chest and abdomen will move with the body, and the chest and abdomen will not be deformed due to other position changes.

MaintainHeadRot     The weight of the default animation of the head. When it is 0, the head does not move with other positions and maintains the original animation. 1 o'clock, very soft

Arm arm

Focus on understanding the Target properties, such as Target under Hand, drag the object in the scene to the Target, and then adjust the Position Weight to 1. At this time, drag the Target object and you can find that the character's hands will follow the movement of the object.

code control

Set total weight

GetComponent<FullBodyBipedIK>().solver.SetIKPositionWeight(1);

Set the left and right arms and left and right legs

GetComponent<FullBodyBipedIK>().solver.SetChainWeights(FullBodyBipedChain.LeftArm,1, 1);

Set weights: Body position, left and right hands, feet, shoulders, thigh Thigh

GetComponent<FullBodyBipedIK>().solver.SetEffectorWeights(FullBodyBipedEffector.Body,1, 1);

2.Aim Ik component—aiming component

Target The object that is aimed at

Pole Target The position of the object can control the character's left and right probes (such as the left and right probe effects in gun battle games)

Aim Transform Which part should be used to aim at the target (generally, a new empty object is created at the muzzle and the empty object is used)

Axis Points the axis of the aim target to the target. The default is the z-axis, which is generally not modified.

weight The weight of the mixed IK effect, used in conjunction with clampWeight

clampWeight solver’s rotation value. 0 is free spin, 1 is completely fixed to no effect.
Generally, weight is 1 and clampWeight is about 0.5

Bones Drag in the human bones, usually from the spine to the neck, and then adjust the Weight of each bone to indicate the degree of influence of each part when the human body rotates with the target. Generally, the further down the neck, the lower the weight.

3.Grounder Full Body Biped IK component---the character's feet fit the terrain

To use this component, the character needs to have Full Body Biped IK

Layers The level of footstep detection needs to be consistent with the level of the terrain

Max Step Maximum foot lifting height

Focus on understanding Spine - the whole body's bones will have a certain impact when the character moves uphill. Add elements to Spine, select EffectorType, and adjust the Weight to complete the affected weight of the part when the character moves.

4.Interaction System------Interaction system, that is, the interaction between characters and objects such as buttons and doors

To use this system, you need to add the Full Body Biped IK component to the character, then add the Interaction System component, and then the target object needs to have the Interaction Object component, then add Weight Curves, select Type and configure the curve, then you can add Event events, and you can choose to interact Pause and Pick Up.

Then add a simple script to the character, as follows

public class FinalIKInteractionController : MonoBehaviour
{
    public InteractionSystem Interaction_System;

    public InteractionObject Interaction_Object;

    void Update()
    {

        if(Input.GetKeyDown(KeyCode.Space))
        {

            //此处选择与物体交互使用哪个部位
            Interaction_System.StartInteraction(FullBodyBipedEffector.LeftHand,Interaction_Object, true);
        }

        else if (Input.GetKeyDown(KeyCode.B))
        {
            //取消暂停
            Interaction_System.ResumeAll();
        }
    }
}

If you need the hand to fit the object better, you need to copy the model hand, adjust the finger rotation, and copy a copy to the target object as a sub-object of the target object, then add the Interaction Target component to the sub-object and assign the target object Give Pivot and adjust the Twist Axis rotation axis to achieve a natural hand feel when the character interacts with objects.

Then you can add animation to the object to achieve interactive animation effects such as pressing buttons and opening doors.

For specific effect adjustments, please refer to Lecture 5 of the FinalIk tutorial inUnity plug-in tutorial collection.

5.CCDIK---Customized bone joints

CCDIK is suitable for non-human skeletons and objects with multiple joints, such as multi-joint robotic arms.

The Target, Weight, and other parameters are the same as before. The main reason is that Bones needs to load the shutdown of the robotic arm separately and adjust the Weight. Sometimes it is necessary to limit the rotation of the bone nodes of the robotic arm. You can add

Rotation Limit Angle, Rotation Limit Hinge

Guess you like

Origin blog.csdn.net/qq_42720695/article/details/133025273