Inverse Kinematic

How do I…

Create inverse kinematics using the inbuilt physics engine

What do you want to do? I had to Google “inverse kinematics” Is this what you’re referring to?

“Inverse kinematics is the use of kinematic equations to determine the motion of a robot to reach a desired position. For example, to perform automated bin picking, a robotic arm used in a manufacturing line needs precise motion from an initial position to a desired position between bins and manufacturing machines.”

Yes, I want to have a limb of a thing to go to a specified point while using the physics 2.0 engine

Are you using joints? When I think about the Physics behavior I think gravity. I forget it also does joints which don’t get the attention that it should.

I don’t think there are built-in functions to calculate it but there are a lot of math expressions.

Are you working in 2D or the newer 3D? (Please say 2D)

Yes I am using 2d and joints

Good. 2D is much easier overall. I know nothing about Inverse Kinematic but I’m pretty familiar with Gdevelop. If you know or find the math, we can help you incorporate it. I might not understand how formulas work but I’m good at making them work. If that makes sense.

If you haven’t already, I would first work on the limb. The joints are basically motors. I would use scroll bars to test them since you can set the min/max to 0-360.

Once you have the mechanical part done. You can work on the Inverse Kinematic. It probably won’t be easy but it also won’t be too difficult when you have the knowledge of the world a Google search away.

If you have specific problems, feel free to post as often as needed. Just keep them specific and add images of the scene and/or events when you can. Good luck.

I’d just add to @Keith_1357 comment that if you can find a javascript implementation of the Inverse Kinematics algorithms, then that makes it all a lot simpler.

The other thing to keep in mind is that you don’t necessarily need to use IK to stop at a point. You could put a hidden static physics object (one that absorbs all the energy/momentum) in the path of the limb, preventing the limb from moving further.

Or use an elastic joint to pull the limb to the position you’re after.

1 Like