wondering if anyone else has played with this new feature yet and have figure out how best to get the splineIk’s solver solution rotations to match a keyframed skeleton mesh animation?
I’ll show you what I have found so far and please let me know if you have suggestions.
Basic description is that I am taking the socket transform from the KF animation and using that for the splineIk’s end point transform.
Here is the Blueprint hierarchy,
This is what the Pawn Blueprint does,
I have two animation blueprints, one for the animation I want to match, and one for the ‘hero’ mesh that I apply the spline Ik to. (this will later change to using some baked out leaf joints in the animation clips).
Here is the keyframe mesh Animation Blueprint,
This then is the hero Animation Blueprint. I have tried to figure out what that offset I need to add is but no luck so far.
And this is the result when I play. The red mesh is the SplineIk driven mesh.
The mismatch is because I get double transforms, there’s resulting rotation both from the angle of the curve and from the rotational values passed with the transform.
I of course want a match. If I try to just derive the rotation from the curve itself using the locations of the points I get no yaw rotation match, ie no rotation around Z.
So my current solution to avoid the double transform but retain the yaw rotation is to disconnect the other rotations just using the yaw, and let the others come from the curve. Like this,
I then get this result,
Better but I have yet to try this with my full character setup and different animations so if anyone can see that there is a better solution to this then please let me know!
Or if you can spot why I have to add that dodgy 90 deg rotational offset to get orientation alignment? I have tried to rotate the ‘offs’ node in the hierarchy but not yet found one that works.
(I could have gotten the above solution closer if I took more care about positioning the top end spline point, which I didn’t)