25 Jan 2009

Animation Track Control

I have finishing the setup of the animation control structure, and is now in process of implementing the actually control calculation. Currently it's still not functional and further experiment is required.

The first thing I have to verify clearly is if negative speed in track works, or if only positive speed works. I think what I need to do is just to modify the SetTime function to use positive speed if the unit goes right, and negative speed if it goes left. Only after I confirm the validity of negative speed, can I proceed to the next step.

Though I already have a clear idea about the next step. If the negative speed works, then I just have to try to tell it to use negative speed, and making sure the target time calculation is correct for both positive and negative speed. If the negative speed doesn't work, then I have to create a "negative" track in the model animation, and covert the track position from positive to negative track according to the situation.

UPDATE (Jan 27): It looks like the negative speed doesn't work. I have setup the "negative track" in the model and develop the control code accordingly. It still doesn't quite work but I think it's due to minor bug in timing calculations. After I fix them, I should have a working and quite robust animation control.

No comments: