• 2D
  • Is there an IK Pole Vector?

Hello,

this is as much a 2D question as it is a 3D question. I am looking into the Inverse Kinematics system in Godot, but I can't find how to add a pole vector. Pole Vector is a fundamental component of IK, as it is used to control the bending direction. Many IK examples I see in Godot it are left uncontrollable, resulting in Legs and Arms bending the wrong way.

Looking in the docs I can't find any reference for it; Is there a way to create a pole vector?

Thanks!

In the SkeletonIK node, there is not a way to set the pole vector exactly. However, you can use the magnet property to push the middle joint of the FABRIK chain in the direction that the vector points, which can help define which direction the IK bends in. The documentation, sadly, does not mention this. I only figured it out when I was working on the 3D IK demo on the Godot demo repository.

In 2D, unfortunately there is no (that I know of) to define the pole vector or push the chain in the intended direction.

Thanks a lot for the reply! I should look into the IK demo and see how they are meant to be used. So the SkeletonIK node is not meant to work in 2D then?

@SimonTheSorcerer said: So the SkeletonIK node is not meant to work in 2D then?

I believe it is only for 3D, but I could be wrong. I have not seen it used in 2D though.

Edit: A quick look at the source code shows that it is only intended to be used in 3D (it has also be renamed SkeletonIK3D in the master branch).

I understand, thanks a lot for the information! Considering the popularity of 2d, I hope a 2d equivalent will come at some point.

a year later

The problem is my pole moves with my arm. How can I implement this so it does not move or uses a Spatial instead for the magnet position?