PDA

View Full Version : keyframes not equivalent in director


Kenshin_X_66
02-06-2004, 06:51 AM
ok, so ive set up a real simple animation in layout, exported the scene into .w3d and imported it into director.

i know this isnt a lightwave user question, but ive tried all the macromedia and other director forums and no-one wants to help me.

so ive got an animation 90 frames long, it starts on 30, but i want it to be interactive, so im looping on frame 29, then on a key press by the user, the playhead jumps to 30 and plays my animation, all simple, but if i loop the playhead it just goes ahead and plays the animation, does anyone know a lingo script that syncs my lightwave keyframes to directors?

or have i lost everyone

Naomi
02-10-2004, 10:51 AM
You can't really synch frames in lightwave, with frames in Director. The keyframepleyer is time based rather than frame based. You really need to be just looping on one frame of director, and use code to control all of the interactivity.


What you will need to do is

1) play your animation:

tModel = member("3dmember").model("the_model_playing_animation")

tModel.keyframeplayer.play("the_motion", 0 , 1, 1000)

2) wait for the currenttime of the motion to reach the equivalent of 29 frames or over.

3) pause the keyframeplayer

tTheModel.keyframeplayer.playrate = 0

4) on the keypress resume the keyframeplayer

tTheModel.keyframeplayer.playrate = 1



If you are playing a chunk of a motion, you sometimes have to set the currenttime to the start time of that animation to avoid a flicker.

One more thing to note: the frame period in lightwave bears to relationship (that I have bothered to find) with the keyrameplayer current time in Director. Either work out what the ratio is, or just adjust until you get it right.

Good luck.