Skip to content

Commit

Permalink
Changes:
Browse files Browse the repository at this point in the history
* SkeletonModificationStack2D: Now has a strength of 1 by default
* SkeletonModification2DLookAt: Removed useless argument in the clamp_angle function.
* Added initial SkeletonModification2DCCDIK!
  * Works great! The code is mostly just a port of the 3D version.
  * Operates in a chain, like the 3D version. Fully supports angle constraints.
  * Doesn't work right now with rotating from the tip, so it only rotates from the joint right now. I will need to fix this though.
  * Because it is rotating from the joint, not the tip, it is really more like a chain of LookAt than CCDIK...
  * Added SkeletonModification2DCCDIK as a registered class. Moved SkeletonModification2D to a virtual class.

TODO: make clamp_angle a generic function that can be used by all of the SkeletonModification2Ds and try and fix the CCDIK tip rotation issue.
  • Loading branch information
TwistedTwigleg committed Jul 13, 2020
1 parent 3564d0b commit 7bdc233
Show file tree
Hide file tree
Showing 3 changed files with 488 additions and 21 deletions.
3 changes: 2 additions & 1 deletion scene/register_scene_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,9 @@ void register_scene_types() {
ClassDB::register_class<RemoteTransform2D>();

ClassDB::register_class<SkeletonModificationStack2D>();
ClassDB::register_class<SkeletonModification2D>();
ClassDB::register_virtual_class<SkeletonModification2D>();
ClassDB::register_class<SkeletonModification2DLookAt>();
ClassDB::register_class<SkeletonModification2DCCDIK>();

OS::get_singleton()->yield(); //may take time to init

Expand Down
Loading

0 comments on commit 7bdc233

Please sign in to comment.