How do you code IK (Motor6D Based)

  • What are you attempting to achieve? (Keep it simple and clear)
    I am trying to achieve a Motor6D based IK that i can use form my Character , like in this Video

  • What is the issue? (Keep it simple and clear - Include screenshots/videos/GIFs if possible)
    the issue is i dont know how to make it Motor6D based.

  • What solutions have you tried so far? (Have you searched for solutions through the Roblox Wiki yet?)
    Ive looked through the DevForums and found this Post but i am have a hard time understanding it .

Attempt Code

com-video-to-gif%20(3)

Thanks in advance

-Fahedgt5

1 Like

Have you considered reading this article on the Roblox Developer Hub?

Ive read through it before but thats not not my goal since it does not use Motor6ds as joints

1 Like

It should be your goal, though;

It explains how Inverse Kinematics works, and how you could solve for it. You can then edit/apply it to work with Motor6Ds.

Not to be rude, but unless you make an attempt to make something that works, we can’t really help you. People aren’t going to give you a script without you making an effort.

7 Likes

Didn’t stravant put something up for Inverse Kinematic Characters that’s open source. Here is the place btw https://www.roblox.com/games/167637083/Inverse-Kinematic-Characters-Open-Source. Would check that out.

I have already made the IK it works by setting CFrames but its not Motor6d based

i have updated the post with the attempt code

ok guys so i was playing around with the default characters joints and finally got a kinda working IK
Its not perfect but its ok for the time being

com-video-to-gif%20(4)

3 Likes

Looks really nice! Good job. :slight_smile:

1 Like

An explanation as to how you reached this solution would be nice, to help other developers. How did you play with the joints? Did your code change to help accomplish this? Things like this would be helpful to know.

1 Like

Yes i changed my code completely and the problem was in the solver its self its still not perfect

May I ask what the change was? Maybe you could show me the IK code and where you call it. I am really stuck on this.

1 Like

Yes the solver function needs some tuning. I’m not sure exactly what OP did, but if you want another resource where it’s fixed then check this out.

Edit: nvm you are one of the posters in the thread I was originally linking.