ReadMe.txt 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. Dynamic Bone apply physics to character's bones or joints.
  2. With simple setup, your character's hair, cloth, breasts or any part will move realistically.
  3. Open Assets/DynamicBone/Demo/Demo1 to see how it works.
  4. If you have any questions or suggestions, please contact willhongcom@gmail.com.
  5. -------------------------------------------------------------------------
  6. Basic setup:
  7. 1. Prepare a properly setup character, both Mecanim and legacy rigs are supported.
  8. 2. Select the game object you want to apply Dynamic Bone.
  9. 3. In the component menu, select Dynamic Bone -> Dynamic Bone.
  10. 4. In the inspector, select root object.
  11. 5. Adjust dynamic bone parameters (see detail descriptions in the following section).
  12. You can add collider objects if required:
  13. 1. Select game object the collider will attached.
  14. 2. In the component menu, select Dynamic Bone -> Dynamic Bone Collider.
  15. 3. Adjust position and size of the collider.
  16. 4. In Dynamic Bone component, increase size of colliders and append corresponding object.
  17. -------------------------------------------------------------------------
  18. Dynamic Bone component description:
  19. - Root
  20. The root of the transform hierarchy to apply physics.
  21. - Roots
  22. Multiple roots are allowed. They all share the same parameters.
  23. - Update Rate
  24. Internal physics simulation rate, measures in frames per seconds.
  25. - Update Mode
  26. Normal: Update physics in fixed timestamp as specified rate.
  27. AnimatePhysics: Updates during the physic loop in order to synchronized with the physics engine.
  28. UnscaledTime: Updates independently of Time.timeScale.
  29. Default: Update physics every frame instead of specified rate, recommended.
  30. - Damping
  31. How much the bones slowed down.
  32. - Elasticity
  33. How much the force applied to return each bone to original orientation.
  34. - Stiffness
  35. How much bone's original orientation are preserved.
  36. - Inert
  37. How much character's position change is ignored in physics simulation.
  38. - Friction
  39. How much the bones slowed down when collide.
  40. - Radius
  41. Each bone can be a sphere to collide with colliders. Radius describe sphere's size.
  42. - Damping Distrib, Elasticity Distrib, Stiffness Distrib, Inert Distrib, Radius Distrib
  43. How parameters change over hierarchy chain. Curve values are multiplied to corresponding parameters.
  44. - End Length
  45. If End Length is not zero, an extra bone is generated at the end of transform hierarchy,
  46. length is multiplied by last two bone's distance.
  47. - End Offset
  48. If End Offset is not zero, an extra bone is generated at the end of transform hierarchy,
  49. offset is in character's local space.
  50. - Gravity
  51. The force apply to bones, in world space. Partial force apply to character's initial pose is cancelled out.
  52. - Force
  53. The force apply to bones, in world space.
  54. - Blend Weight
  55. Control how physics blends with existing animation.
  56. - Colliders
  57. Collider objects interact with the bones.
  58. - Exclusions
  59. Bones exclude from physics simulation.
  60. - Freeze Axis
  61. Constrain bones to move on specified plane.
  62. - Distant Disable, Reference Object, Distance To Object
  63. Disable physics simulation automatically if character is far from camera or player.
  64. If there is no reference object, default main camera is used.
  65. Dynamic Bone Collider component description:
  66. - Center
  67. The center of the sphere or capsule, in the object's local space.
  68. - Radius
  69. The radius of the sphere or capsule, will be scaled by the transform's scale.
  70. - Height
  71. The height of the capsule, including two half-spheres, will be scaled by the transform's scale.
  72. - Radius 2
  73. The other radius of the capsule. 0 means same as Radius.
  74. - Direction
  75. The axis of the capsule's height.
  76. - Bound
  77. Constrain bones to outside bound or inside bound.
  78. -------------------------------------------------------------------------
  79. Dynamic Bone script reference:
  80. - public void SetWeight(float w);
  81. Control how physics blend with existing animation.
  82. - public void UpdateParameters();
  83. Update parameters at runtime, call this funtion after modifing parameters.
  84. - public bool m_Multithread
  85. Enable/disable multithread to improve physics simulation performace. Default is true.
  86. -------------------------------------------------------------------------
  87. Version History
  88. 1.0.1 Initial release.
  89. 1.0.2 Improve inspector UI.
  90. 1.0.3 Fix inert unstable when enabled / disabled.
  91. 1.1.0 Use curve to setup parameters over hierarchy chain.
  92. Collider can configured to constrain bones inside bound.
  93. 1.1.1 Add exclusion setting.
  94. 1.1.2 Deal with negative scale problem.
  95. 1.1.3 Fix bug with bones contain scale.
  96. 1.1.4 Add freeze axis.
  97. Fix bug when added via script.
  98. 1.1.5 Add distant disable.
  99. Reduce GC alloc.
  100. 1.1.6 Fix capsule collider bug.
  101. 1.1.7 Unity 5 support.
  102. 1.1.8 Fix problems caused by negative scale.
  103. 1.1.9 Improve detecting negative scale.
  104. Fix bug if collider is set as inside.
  105. Add UpdateMode setting.
  106. 1.1.10 Fix problems caused by negative scale after Unity 5.4.
  107. 1.2.0 Add tool tips.
  108. Add plane collider.
  109. Add function to update parameters at runtime.
  110. 1.2.1 Add friction parameter.
  111. Update UNITY_5 to compatible with newer version.
  112. 1.2.2 Add "Default" update mode, fix some jitter issue.
  113. 1.3.0 Add "Roots" parameter to setup multiple root transforms.
  114. Add "Blend Weight" parameter to control how physics blends with existing animation.
  115. Collider add enable/disable check box.
  116. Collider add "Radius 2" to setup capsules of two radii.
  117. Use multithread to improve physics simulation performance.
  118. Parameters can be animated with Unity animation system.
  119. 1.3.1 Fix "Gravity" bug in version 1.3.0