-
Notifications
You must be signed in to change notification settings - Fork 69
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
How to implement Hinge Constraints? #2
Comments
Hey Peach1! You are very welcome to give this a go. static void
apply_hinge(ikreal_t delta_rotation[4],
const ikreal_t current_rotation[4],
struct ik_constraint_t* constraint)
{
/* write to delta_rotation */
} The way this was supposed to work is you would check if the segment is within the constraint limits, and if it is not, you calculate what the rotation would need to be in order to move the segment back into the limit ( Feel free to add or remove what you need from https://github.com/TheComet/ik/blob/devel/ik/include/public/ik/constraint.h#L33 If you look at https://github.com/TheComet/ik/blob/devel/ik/src/solver_fabrik.c you will see This part doesn't work at all yet. If you want you can rewrite those two functions from scratch. I think that's all I can offer for now. I've had very little time to work on this unfortunately, I'm not sure whether the devel branch even works properly. I recall leaving the project in a mess where nothing works, so if you have issues you should probably switch to master and I'll work on merging the fixes from devel. Do you have Discord? I'm TheComet#5387 |
Hey, I noticed that constraints don't seem to be implemented yet, I would like to try implementing it.
Would hinge constraints just be clamping angles of the quaternion or is it more complicated to do correctly?
https://github.com/TheComet/ik/blob/devel/ik/src/constraint.c#L35
This fabrik IK library is pretty useful and I'm using the version from Urho3D as a standalone, I was wondering if any insight could be provided on what parts of the this ik library need finishing and how to conceptually do so; Like implementing hinge constraints.
The text was updated successfully, but these errors were encountered: