/Assets/DynamicBone/ReadMe.txt

https://bitbucket.org/lila_gibbens/stress_test · Plain Text · 135 lines · 98 code · 37 blank · 0 comment · 0 complexity · 17f8d586fef6ba0ccfb0b553823ec1a9 MD5 · raw file

  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. - Update Rate
  22. Internal physics simulation rate, measures in frames per seconds.
  23. - UpdateMode
  24. Normal: Normal update.
  25. AnimatePhysics: Updates during the physic loop in order to synchronized with the physics engine.
  26. UnscaledTime: Updates independently of Time.timeScale.
  27. - Damping
  28. How much the bones slowed down.
  29. - Elasticity
  30. How much the force applied to return each bone to original orientation.
  31. - Stiffness
  32. How much bone's original orientation are preserved.
  33. - Inert
  34. How much character's position change is ignored in physics simulation.
  35. - Radius
  36. Each bone can be a sphere to collide with colliders. Radius describe sphere's size.
  37. - Damping Distrib, Elasticity Distrib, Stiffness Distrib, Inert Distrib, Radius Distrib
  38. How parameters change over hierarchy chain. Curve values are multiplied to corresponding parameters.
  39. - End Length
  40. If End Length is not zero, an extra bone is generated at the end of transform hierarchy,
  41. length is multiplied by last two bone's distance.
  42. - End Offset
  43. If End Offset is not zero, an extra bone is generated at the end of transform hierarchy,
  44. offset is in character's local space.
  45. - Gravity
  46. The force apply to bones, in world space. Partial force apply to character's initial pose is cancelled out.
  47. - Force
  48. The force apply to bones, in world space.
  49. - Colliders
  50. Collider objects interact with the bones.
  51. - Exclusions
  52. Bones exclude from physics simulation.
  53. - Freeze Axis
  54. Constrain bones to move on specified plane.
  55. - Distant Disable, Reference Object, Distance To Object
  56. Disable physics simulation automatically if character is far from camera or player.
  57. If there is no reference object, default main camera is used.
  58. Dynamic Bone Collider component description:
  59. - Center
  60. The center of the sphere or capsule, in the object's local space.
  61. - Radius
  62. The radius of the sphere or capsule, will be scaled by the transform's scale.
  63. - Height
  64. The height of the capsule, including two half-spheres, will be scaled by the transform's scale.
  65. - Direction
  66. The axis of the capsule's height.
  67. - Bound
  68. Constrain bones to outside bound or inside bound.
  69. -------------------------------------------------------------------------
  70. Dynamic Bone script reference:
  71. - public void SetWeight(float w);
  72. Control how physics blend with existing animation.
  73. - public void UpdateParameters();
  74. Update parameters at runtime, call this funtion after modifing parameters.
  75. -------------------------------------------------------------------------
  76. Version History
  77. 1.0.1 Initial release.
  78. 1.0.2 Improve inspector UI.
  79. 1.0.3 Fix inert unstable when enabled / disabled.
  80. 1.1.0 Use curve to setup parameters over hierarchy chain.
  81. Collider can configured to constrain bones inside bound.
  82. 1.1.1 Add exclusion setting.
  83. 1.1.2 Deal with negative scale problem.
  84. 1.1.3 Fix bug with bones contain scale.
  85. 1.1.4 Add freeze axis.
  86. Fix bug when added via script.
  87. 1.1.5 Add distant disable.
  88. Reduce GC alloc.
  89. 1.1.6 Fix capsule collider bug.
  90. 1.1.7 Unity 5 support.
  91. 1.1.8 Fix problems caused by negative scale.
  92. 1.1.9 Improve detecting negative scale.
  93. Fix bug if collider is set as inside.
  94. Add UpdateMode setting.
  95. 1.1.10 Fix problems caused by negative scale after Unity 5.4.
  96. 1.2.0 Add tool tips.
  97. Add plane collider.
  98. Add function to update parameters at runtime.