-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Ballhead constraints for FABRIK #62003
base: master
Are you sure you want to change the base?
Conversation
@@ -75,6 +78,10 @@ class SkeletonModification3DFABRIK : public SkeletonModification3D { | |||
void chain_forwards(); | |||
void chain_apply(); | |||
|
|||
Vector3 chain_ball_constraint(int i); | |||
Vector3 getAngleLimitedUnitVectorDegs(const Vector3 &vecToLimit, const Vector3 &vecBaseline, real_t angleLimitDegs); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
godot is get_angle_limited_unit_vector
and also uses radians by convention.
Vector3 SkeletonModification3DFABRIK::getAngleLimitedUnitVectorDegs(const Vector3 &vecToLimit, const Vector3 &vecBaseline, real_t angleLimitDegs) { | ||
// Get the angle between the two vectors | ||
// Note: This will ALWAYS be a positive value between 0 and 180 degrees. | ||
float angleBetweenVectorsDegs = getAngleBetweenDegs(vecBaseline, vecToLimit); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getAngleBetweenDegs -> get_angle_between_degs
Please correct the naming conventions.
https://github.com/godotengine/godot/runs/6867213499 is failing a task, but I am not able to reproduce the reason why this is the case. I modified the source as requested by the revisions. |
did you test it ? |
The last version on my branch does not work, there were some problems with indices which I later solved but never pushed. Still, I was not satisfied by that implementation, and I continued working on a more general way to integrate different types of constraint and the related UI. The main issue is that some of those I would like to integrate are not as easy on FABRIK and could cause numerical instabilities. |
no problem at all, I was just checking because I don't think that my code is that good, I am too learning about the IK stuff, thanks for putting time and work into these stuff. |
Can you share your thinking of the current Godot4 IK? Is there progress? |
A copy of #61994 to better follow the guidelines about rebasing.
Not to be merged yet, as I have not been able to really test its functionality.
godotengine/godot-proposals#750 (comment)
The author referenced a solution of ballhead constraint on the inverse kinematic model for FABRIK. I just ported its code and integrated it in the GUI of Godot.
Any external evaluation is very welcome.