Skip to main content
Participant
September 14, 2015
Question

IKMover always animating in one step !

  • September 14, 2015
  • 0 replies
  • 145 views

Hi !

I'm having troubles making an IKMover animate an armature move in more than one step !

It always snaps to the new position whatever parameters I try.

Here's what I'm doing :

            var ik:IKMover = new IKMover(destEndEffector, destPos);

            ik.addEventListener(IKEvent.DISTANCE_LIMIT, timeLimitFunction);

            ik.addEventListener(IKEvent.ITERATION_LIMIT, timeLimitFunction);

            ik.addEventListener(IKEvent.SINGLE_STEP, timeLimitFunction);

            ik.addEventListener(IKEvent.TIME_LIMIT, timeLimitFunction);

          ik.moveTo(sourcePos);

I tried setting the distance limit, or time or iteration, but it doesn't change anything.

when I don't set any of those, I log :

[Event type="singleStep" bubbles=false cancelable=false eventPhase=2]

time is 0

distance is 0

iterationCount is 0

if I set any of the limits, singleStep doesn't get called, I only get a limit event like :

for example with :

            ik.limitByDistance = true;

            ik.distanceLimit = 0.1;

I get :

[Event type="distanceLimit" bubbles=false cancelable=false eventPhase=2]

time is 0

distance is 0.00006258843785512705

iterationCount is 3

Maybe I'm not understanding what IKMover is supposed to do.

Is it possible to set an animation time, like one would do a pose inside the editor, during runtime ?

Note that I'd like to animate the whole armature each time...

There aren't many references on the web about fl.ik, besides the wheel thing. I gess not many people are using it ?

This topic has been closed for replies.