Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add dynamic bone #199

Merged
merged 1 commit into from
Jun 13, 2023
Merged

Conversation

yangfengzzz
Copy link
Member

@yangfengzzz yangfengzzz commented Apr 19, 2023

Dynamic bones are generally used to add physics-based animation to character animation, and can be used for hair,
ribbons, tails, and even clothing. Enhanced effects of original character animation.

Although spring motion can also be realized with a physics engine such as PhysX, dynamic bones generally need to
customize some motion curves to meet artistic needs. Therefore, this repository implements a custom small physics engine
to meet this requirement. This physics engine only implements particle-based spring animation, plus Capsule, Sphere,
and Plane colliders.

  var entity = createEntity(rootEntity, new Vector3(1, -1, 0), new Color(0, 0.7, 0));
  entity.addComponent(MoveScript);
  let dynamicBone = entity.addComponent(DynamicBone);
  dynamicBone.setWeight(0.9);

  entity = createEntity(entity, new Vector3(1, -1, 0));
  dynamicBone.root = entity.transform;

  entity = createEntity(entity, new Vector3(1, -1, 0));
  entity = createEntity(entity, new Vector3(1, -1, 0));
  entity = createEntity(entity, new Vector3(1, -1, 0));
  entity = createEntity(entity, new Vector3(1, -1, 0));
  entity = createEntity(entity, new Vector3(1, -1, 0));
  entity = createEntity(entity, new Vector3(1, -1, 0));

@yangfengzzz yangfengzzz added high priority High priority issue feature New feature labels Apr 19, 2023
@yangfengzzz yangfengzzz added this to the 1.1 milestone Apr 19, 2023
@yangfengzzz yangfengzzz self-assigned this Apr 19, 2023
@yangfengzzz yangfengzzz linked an issue Apr 19, 2023 that may be closed by this pull request
@codecov-commenter
Copy link

Codecov Report

Patch and project coverage have no change.

Comparison is base (f436352) 22.19% compared to head (b278803) 22.19%.

❗ Current head b278803 differs from pull request most recent head 291472f. Consider uploading reports for the commit 291472f to get more accurate results

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@           Coverage Diff            @@
##           dev/1.1     #199   +/-   ##
========================================
  Coverage    22.19%   22.19%           
========================================
  Files           11       11           
  Lines          473      473           
  Branches        70       70           
========================================
  Hits           105      105           
  Misses         364      364           
  Partials         4        4           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@yangfengzzz yangfengzzz merged commit f39ea3b into galacean:dev/1.1 Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature high priority High priority issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spring Bone
2 participants