Skip to content
/ GodotIK Public

3D Inverse Kinematics (IK) for Godot 4.3+! Supports scriptable constraints and multiple chains.

License

Notifications You must be signed in to change notification settings

monxa/GodotIK

Repository files navigation

GodotIK

3D Inverse Kinematics for Godot 4.3+

I needed IK. People said IK was hard. I did it anyway.

This project provides three classes:

  • GodotIK
    A SkeletonModifier that does all the magic.

  • GodotIKEffector
    Parented by GodotIK in the SceneTree, these nodes position the bones, define the chain length, and rotate the affected bone according to their transform_behavior property.

  • GodotIKConstraint
    An abstract class that is parented by GodotIKEffectors. Two examples are provided as GDScript implementations: PoleConstraint and StraightBoneConstraint.

This is the best implementation I could come up with. It's stable—at least as stable as it gets with constraints.

For further reference, check out the doc_classes/ directory; it tells it all.

SceneTree example: Skeleton3D -> GodotIK -> [GodotIKEffectors] -> GodotIKConstraint

Demo

demo_libik.webm

(Video sometimes doesn't load. Refreshing page often helps.)

Getting started

We have binaries!

The easy way

  1. Download release https://github.com/monxa/GodotIK/releases
  2. Unpack and copy /addons into <your-project-path>

The hard way (build it yourself)

  1. git clone
  2. git submodule init # for godot-cpp
  3. git submodule update # for godot-cpp
  4. scons # compile
  5. cp -r godot_project/addons/libik <your-project-path>/addons

If you recently unsuccessfully cloned or tried to build the repository, it was probably because the godot-cpp submodule was configured to use the SSH origin, which you needed to set up. We have now switched to the HTTPS origin. To fix this, run git submodule sync followed by git submodule update.

About

3D Inverse Kinematics (IK) for Godot 4.3+! Supports scriptable constraints and multiple chains.

Resources

License

Stars

Watchers

Forks

Packages

No packages published