Unity Dynamic Bone Dynamic Bone

This article is an article for translating its documentation and helping you use it. If you need a plug-in, please join the group: 891555732 Please
note: Plug-ins are for research only, not for commercial use


Dynamic Bones apply physics to a character's bones or joints.
With simple setup, your character's hair, clothes, chest or any part will move realistically.

1. Basic setup

  1. Prepare a properly set character model, both Mecanim and legacy rigs support it.
    2. Select the GameObject to apply the dynamic bone to.
    3. In the component menu, select Dynamic Bone -> Dynamic Bone.
    4. In the inspector, select the root object.
    5. Adjust the dynamic bone parameters (see detailed description in the following section).
    image.png


    You can add collider objects if needed:
  • Select the game object that the collider will be attached to.
  • From the Components menu, select Dynamic Bone -> Dynamic Bone Collider.
  • Adjust the position and size of the collider.
  • In the dynamic bone component, increase the size of the collider and add the corresponding object.

image.png

2. Component parameter description

1.Dynamic Bone

Root The root of the transform hierarchy for applying physics.
Update Rate Internal physics simulation rate in frames per second.
UpdateMode Normal: Normal update.
AnimatePhysics: Updated during the physics loop to synchronize with the physics engine.
UnscaledTime: Updates independently of Time.timeScale.
Damping How slow the bones are.
Elasticity How much force is applied to return each bone to its original orientation.
Stiffness How much the original orientation of the bones is preserved.
Inert In the physics simulation, the character's position changes are ignored.
Radius Each bone can be a sphere to collide with the collider. The radius describes the size of the sphere.
Damping Distrib, Elasticity Distrib, Stiffness Distrib, Inert Distrib, Radius Distrib How the parameter changes the hierarchy chain. Multiplies the curve value by the corresponding parameter.
End Length If the end length is not 0, an extra bone is generated at the end of the transformation hierarchy,
the length multiplied by the distance of the last two bones.
End Offset If the end offset is not 0, an extra bone is generated at the end of the transformation hierarchy, offset in the character's local space.
Gravity In world space, the force acts on the bone. Part of the force applied to the character's initial pose is offset.
Force In world space, the force acts on the bone.
Colliders Colliders interact with bones. prevent cross collision
Exclusions Bones are excluded from physics simulations.
Freeze Axis Constrains bones to move on specified planes.
Distant Disable, Reference Object, Distance To Object Automatically disables physics simulation if the character moves away from the camera or player.
If no object is referenced, the default main camera is used.


function:

  • public void SetWeight(float w);

    Controls how physics blends with existing animation.
  • public void UpdateParameters();

    Update parameters at runtime, call this function after modifying parameters.

2. Dynamic Bone Collider component property description

Hanging on objects that have the potential to collide in the scene

Center The center of the sphere or capsule, within the object's local space.
Radius The radius of the sphere or capsule that will be scaled by the transform.
The larger the parameter, the smaller the chance of collision with the object
Height The height of the capsule, including both hemispheres, will be scaled by the transform.
Direction Axis for capsule height.
Bound Constrain bones to the outside or inside.


Tutorial:
Exploration and practice of Unity cloth system and Dynamic Bone, fast blur material and picture blur material in Unity

Guess you like

Origin blog.csdn.net/dengshunhao/article/details/105165215