Questions on Motor6D manipulation based on IK constraits

I am trying to make a R15 movement animation system that is similar to the phantom forces.
This is my idea:

  1. Raycast on the ground on where the character’s feet is going to step on according to player input
  2. Based on the position that the ray gives, use IK to figure the bends of the leg to touch the ground.

I have the ability to do the raycast part but not the IK part.

Can somebody help me understand how to do IK with script?
Thank you :slight_smile:

Luckily for you for an R15 character there is already a community resource for a procedural foot planting system. The maths of the IK in that system also has been covered in this thread. Both of these methods use trigonometric methods to solve the angles of each limb which may be complex to understand especially when applying these angles to manipulate Motor6D C0 CFrames.

Alternatively, you can use my FABRIK Algorithm open source project which does not require trigonometry as it uses vectors manipulation to solve for the limb. However, currently, It’s difficult to make the leg bend in the correct direction which I’m planning to solve. Hopefully, you can start downloading the place files of each project and start experimenting to make your own conclusions on how to make an IK system.

1 Like