2

I am looking for leads on an Open Source IK library for AS3.

My project involves simple 2D limbs with shoulder/elbow/wrist joints.

If I am unable to find anything I am going to try and write one, although my math is not anywhere near up to the task.

Any leads to existing libraries and/or appropriate source material would be appreciated!

jkopel
  • 121
  • 5

3 Answers3

2

You could create an Inverse Kinematics solution with the Law of Cosines: http://en.wikipedia.org/wiki/Cosine_formula

An AS3 implementation can be found here: http://www.kynd.info/library/mathandphysics/inverseKinematics_01/

Creating a generic IK-class from this shouldn't be to hard

Stefan R
  • 21
  • 2
0

For ragdolls I would try box2d:

box2dflash.sourceforge.net/

redconservatory
  • 21,438
  • 40
  • 120
  • 189
  • Box2D is rigid body physics, no IK there. – alxx Jan 17 '11 at 21:19
  • I don't want a ragdoll since that requires I set up motors to make the joints posable. I have looked long and hard at Box2D and I might be able to get it to do what I want (posable limbs whose location can be saved and recreated). I am not sure it is worth the overhead of the entire library though. – jkopel Jan 18 '11 at 03:13
0

Well, there's the IK library that comes with Flash Professional, but it tied to the Bone Tool in the IDE. You can't create bones from scratch in actionscript, you need to assign them in the IDE and access them from code later.

About 3 years ago I played with IK and made a very basic animation tool for my coursework called Flanimator

Flanimator preview

I wrote that using what I've learned from Keith Peters' Foundation Actionscript 3.0 Animation: Making Things Move! book, which I recommend. Chapters 13 and 14 are on IK and FK. The code is available on the site.

I haven't come across a nice as3 IK library, but that would be handy.

George Profenza
  • 50,687
  • 19
  • 144
  • 218
  • I am sure you are trying to be helpful, but you are not really answering the question. I have worked extensively with the built in bone tool/IK library, and it's flaws are what originally drove me to look for an open source alternative. – jkopel Jul 10 '11 at 23:04