Jump to content
Search Community

Does GreenSock work with inverse kinematics?

adifrank test
Moderator Tag

Recommended Posts

I tested this out - made a simple bone structure made from two long rectangles connected by a joint at one end and then at the opposite end of each of these long rectangles I created a small rectangle.

 

Here's what that looks like:

91m4q0.jpg

 

Each of these rectangles is a MovieClip and they are all connected in the bone structure in an armature layer.

 

I gave the top purple small rectangle an instance name of: topStem

 

Then I wrote the following code:

TweenLite.to(topStem, 2, {y:"-30"});

 

What I expected to happen is that the topStem would move upwards pulling with it the long rectangle it is connected to and thus creating a wider angle between the two long rectangles.

But in reality, the topStem MovieClip just animated upwards by itself, not affecting or moving the other MovieClips in the bone structure at all.

 

What am I doing wrong?

 

By the way.... I set the armature layer type in Properties to: Runtime (yet results are exactly the same regardless if it is set to Runtime or Authortime.

Link to comment
Share on other sites

your approach is a bit different than the tutorial I referenced. (armatures on a shape vs a series of movie clips)

 

when dealing with IK you need to have a firm understanding of the elements in the AS3 IK package (which I don't):

 

http://help.adobe.com/en_US/FlashPlatfo ... etail.html

 

Overview

 

http://help.adobe.com/en_US/as3/dev/WS3 ... B6D6DE5266

 

It seems you will be most interested in the IKMover.moveTo() method:

http://help.adobe.com/en_US/FlashPlatfo ... ml#moveTo()

 

so you need to tween a point object and pass it to IKMover.moveTo(), and not just tween the x or y of a movie clip instance.

 

I have not done this before and quite frankly it seems a bit complicated. But I'm sure if you can figure out how to use some of the examples in the links above and are able to programmatically change the position of your bones, it will be entirely possible to do that manipulation with TweenLite.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...