[REQUEST] Could we please have the option to add a 'hint' transform to SetAbilityIKTarget()?

DankP3

Active member
Hopefully this is self explanatory. At the moment the CharacterIK uses hints for non-dominant hands on items. It would be very helpful for custom actions if a hint could also be added to custom IK?

Apologies if this is the case and I have missed it.

Thanks
 
Hi @DankP3 you can indeed set IK targets outside of items quite easily and for anything really. There is just enough accessible by code to achieve pretty much whatever you like to do with IK. If you could explain your use case a bit I maybe able to help you implement a solution. I did some crafty stuff with the ik in my seating controller asset and was quite impressed with the flexibility.
 
Thanks, I have been setting IK targets outside of items quite a bit - using SetAbilityIKTarget(). I like the simplicity of this method and that it is easily setup with the state system etc. even though it is essentially UnityIK.
The main point I am making is that there is no built in method to set the IK elbow hints, I am sure I could work around and modify CharacterIK to make this straightforward, but this seems like it might be a common use case and if a hint transform could be passed as an additional parameter in SetAbilityIKTarget(), or similar simple method, I think that could be widely useful. It is for any use case, to stop elbows clipping through bodies, or maybe in specific environments, the furniture, etc. to make the animation look human.
 
The main point I am making is that there is no built in method to set the IK elbow hints
Oh ok but I am still failing to understand the need for the extra parameter, I have always just set the elbows and knees using SetAbilityIKTarget() and it has worked fine. I see a new parameter has been added, but if you check out the code, its doing the same thing anyway. Just from a second array now. Essentially making the same thing more bloated.
 
@FastSkillTeam It's entirely possible I didn't realize the original flexibility available.

@Justin I think you made a mistake and line 471 of CharacterIK needs to increment the int: m_AbilityIKHintTarget[(int)ikGoal+1] = hintTarget;
 
@Justin @DankP3 A new bug has been caused by this... There was no need to make the initial change or patch change. ikgoal+1 gets out of bounds.
Can we just please revert this?
There is no point to do extra work on it. It is literally wasted lines of code, an extra array for nothing and new bugs.
The old function was perfect, I have reverted it in my own project.
 
@Justin @DankP3 A new bug has been caused by this... There was no need to make the initial change or patch change. ikgoal+1 gets out of bounds.
Can we just please revert this?
There is no point to do extra work on it. It is literally wasted lines of code, an extra array for nothing and new bugs.
The old function was perfect, I have reverted it in my own project.
Having a better understanding of setting the IK hints now, and not that I have the scope of knowledge to influence the decision, but I would be happy to revert and send all the IK messages separately.
 
Having a better understanding of setting the IK hints now, and not that I have the scope of knowledge to influence the decision, but I would be happy to revert and send all the IK messages separately.
I am going to send you an example chunk of code to help you, a for loop can achieve the results easily.
 
Having direct access to the hint within the ability code is helpful if for example you are interacting and want the elbow to be pointing in another direction. What bugs did you come across?
 
I never tested it, but I presume was FST meant was that both the target and hint could always have been set in two lines in the old version (which I did not appreciate), for example:
m_CharacterIK.SetAbilityIKTarget(m_IKTarget, CharacterIKBase.IKGoal.RightHand, time);
m_CharacterIK.SetAbilityIKTarget(m_IKTargetHint, CharacterIKBase.IKGoal.RightElbow, time);

I assume these two lines would have set the target and the hint correctly.

I believe he is looping throught IKtargets and I suspect the increment on the index to identify hints, which is now compulsory, is causing issues.
 
Having direct access to the hint within the ability code is helpful if for example you are interacting and want the elbow to be pointing in another direction. What bugs did you come across?
The hint array is created with the same count as target array. It breaks because count +1 is out of bounds
Explain to me how that array would act any different at all even if it did work bug free anyway. I followed the code. Its just duplicated. It does exactly the same thing. Just more bloat, with more ifs. Someone needs to be checking this logic.
Justin you should have known you can set hints from the start and avoided this mess by just explaining how.
Hints have always been able to be set. I set every single target and use ik heavily.
Uccv3 has enough to fix as it is. Just revert it please.
 
Top