Hi,
I tried your suggestion but w/o much luck. Here’s what I’ve done. I also included a few movies of the issue to help clarify.
...
BatSkelJoint = myActor.controlJoint(None,'modelRoot','FRO:BatSkel')
BatSkelJoint.setPos(0,0,0)
...
idle2getkey = Sequence(idle,getkey)
This seems to work only part of the time. Here’s an example of a run in which the transition looks correct.
http://www.goldengoosegames.com/forumpost/insequence.swf.html
In other runs however, I get the popping on the transition:
http://www.goldengoosegames.com/forumpost/insequence2.swf.html
Next, I tried playing these animations w/a few frames of blending between them for a smoother transition. This problem reared its ugly head again. The issue seems to take place only during the blend and then my actor returns to it’s desired location for the rest of the animation (Notice, I let it loop twice in this one, the second loop doesn’t show any of this behavior, only the first one)
http://www.goldengoosegames.com/forumpost/blended.swf.html
I used this code:
BatSkelJoint = myActor.controlJoint(None,'modelRoot','FRO:BatSkel')
BatSkelJoint.setPos(0,0,0)
myActor.reparentTo(render)
getkey = ActorInterval(myActor,'getkey') #Create an ActorInterval to play getkey
idle = ActorInterval(myActor,'idle') #Create an ActorInterval to play idle
myActor.enableBlend()
myActor.setControlEffect('idle',1.0)
myActor.setControlEffect('getkey',0.0)
blendDuration = (10.0/30.0) #10 Frames of blending
idleToGetKeyBlend = LerpAnimInterval(myActor,blendDuration,'idle','getkey')
getKeyToIdleBlend = LerpAnimInterval(myActor,blendDuration,'getkey','idle')
idle2getkey = Track(
#a.) Start the idle
(0,idle),
#b.) Near the end of the idle blend in getkey
((idle.getDuration()-blendDuration),Parallel(idleToGetKeyBlend,getkey)),
#c.) Near the end of getkey blend idle back in for smooth looping
((idle.getDuration()+getkey.getDuration()-2*blendDuration),Parallel(PosInterval(BatSkelJoint,Vec3(0,0,0)),getKeyToIdleBlend,idle))
)
If however I switch the order of the animations in the sequence, everything looks fine.
http://www.goldengoosegames.com/forumpost/blendedgetkey2idle.swf.html
Using this code:
getkey2idle = Track(
#a.) Start the getkey
(0,getkey),
#b.) Near the end of the getkey blend in idle
((getkey.getDuration()-blendDuration),Parallel(getKeyToIdleBlend,idle)),
#c.) Near the end of idle blend getkey back in for smooth looping
((idle.getDuration()+getkey.getDuration()-2*blendDuration),Parallel(PosInterval(BatSkelJoint,Vec3(0,0,0)),idleToGetKeyBlend,getkey))
)
Please HELP!
Thanks again for your consideration
-A