SetAbilityIKTarget implementation and possibly bug - inconsistent IK rotation control?

DankP3

Active member
I have started experimenting with the built in IK compartment in my custom abilities.

I am setting an artificial IK target this way: m_CharacterIK.SetAbilityIKTarget(m_RightHandTarget, CharacterIKBase.IKGoal.RightHand, time);

"time" is just a float that i can easily adjust in the inspector for this test ability and is described as "the amount of time it takes to reach the goal", which seems clear.

My expected outcome was that setting time to 0 would give an instant IK adjust, whereas setting it for example to 1 would give a slow IK transition. This works, however, the IK rotation is only controlled when time = 0. When time =1 there is no IK rotation control.

Demonstrations (Nolan is more fiddly as a more complex character, but has the same issue):

when time = 0: https://drive.google.com/open?id=1sPPfXFnUncPNPSoI56HRRRjXE9su_iNK

when time = 1: https://drive.google.com/open?id=1WhcExkDhhji3vqcDto1nw2v6rKD0Ggjr

This seems to be a bug to me? but maybe as a first trial i am not using correctly. In both cases movement of the IKTarget results in correct tracking of the hand movement.
As an aside, I also failed to find documentation on custom implementation of the SetAbilityIKTarget() within abilities?
 
I also would have expected the hand to follow the target even if there is a duration set. I'll get this fixed for the next version - thank you!

I don't have any docs on SetAbilityIKTarget but you are using it correctly.
 
So thank you for looking at this, but i think there are still some issues.
My ladder climb has a single IK target for each hand which i move up and down without changing rotation (I have selected one of these in the below videos to show its rotation doesnt change and it moves with the climbing.

The first video is with a transition time of 0 (which is how i left it with the old IK so i had good rotation):

The second is changed in no other way than to set the transition time duration to 0.3 - the hand often appears to point in completely the wrong position (you can see the IK target moving, but its rotation is not changing):

This last video is with IK turned off, so you can see it is not my underlying animation (note the IK target doesnt move in this setup):

Actually, i have two handIK signals operating (one fires when idle) so i set them both to 0.3 and it is now very pronounced and consistent (this second IK signal is why sometimes the hand got it right in the second video as it sent a time=0 signal):

Any idea why it may be getting the rotation wrong when having to lerp?
 
Are you able to send me a small repro scene with the rotation being off? When I tested this I was using a minimal version of the interact ability and my test may not have covered your use case.
 
Top