Hi.
why is foot ik offset multiplied by -1 and why is it used as X value of vector although it is the offset of Z axis?
Hi.
why is foot ik offset multiplied by -1 and why is it used as X value of vector although it is the offset of Z axis?
Hi saeedc,
Is this an example from a sample project or tutorial? At first glance I want to say that it is being multiplied by -1 because one foot is on one side of the center of the character and the other foot is on the other side. However, without having more information about how this was set up, I can’t really say for sure.
Hi .
this is about an example from documentations IK setup
I was able to find out where this was taken from, and it does appear a little unusual. I am going to dig into this some more to try to find out how this particular example was set up.
so i got it to work with third person template character but the reasons of doing things are completely unclear so we cannot be creative enough to create more complex IKs. and there is a bunch of settings for two bone ik node which is not included in documentations
Hey . are you still there?
I have still problem with that part of code. I couldn’t figure it out yet.
Hi saeedc,
I am still trying to wrap my head around what is going on here. There is some math happening behind the scenes that I have not yet nailed down. I am hoping to be able to get together with someone more familiar with the IK functionality in the Engine to see if they can help figure it out.
Hey .
I found it.
IK offset for right foot is multiplied by -1 because the X axis of the pivot of the right foot bone is downward.
but for left bone is upward
it is different for each bone so you should not count on bone’s world space and you should pay attention to bone space only.
and the other thing that i asked about was about : why do we set foot offset as X value of the vector although it seems to be the Z axis? which the answer is that when you look at bone pivot(bone space not world space) you realize that bone’s up axis is X so you must change X axis to move feet up and down :))
after all, I could create an advanced foot IK system for 4.13. you can download my project via this post [Advanced foot IK tutorial for UE4.13][4]
Hi saeedc,
I believe you have managed to figure it out. I was able to get together with someone familiar with working with animation in the Editor, and his thoughts on this essentially matched what you mentioned. I did want to point out though that in this particular instance, it looks like the right foot’s X IK position being inverted in relation to the left foot appears as though it may be unique to this particular character rig. He said that it may not be necessary to invert the X position when a different rig is being used, or you may have to invert the left foot instead, or both.
Your comment about offsetting the X value instead of the Z value to raise the foot’s position is also correct. I was initially thinking in terms of world space and local space, and did not consider the fact that bone space may not correspond with either of those. As soon as you mentioned offsetting bone space, it made perfect sense.
I apologize for the delay in getting this resolved for you. I assigned myself to this post with the hope to learn a little more about animation, since that isn’t really my area of expertise. I did learn some things, but this question turned out to be a little more involved than I had originally anticipated.