Need help with simple time conundrum?

createdbyx

Freshman
Joined
Oct 30, 2003
Messages
34
OK This is really strange....
I am creating some Animation/Track classes for storing key framed animation.
But it only seems to work one way but not the other. I have attached the vb.net code as well as the exe and required dlls. NOTE: That the exe is compiled for the .NET Framework and you will need the framework installed in order for it to run. You will also need DirectX9 installed as well.

First run the "Animation Rotation.exe". You should see a box being rotated. That one works just fine.

Here comes the strange part. Next run the "Animation Scaling.exe". You should see the same box but it will be scaled instead of rotated. Just let the app run and you will start to see the animation slow down! What the heck is up with that?

If you unzip the source code you will see a Animation.vb file. In that file you will see a Animation module with one method called Update. That is where I blend between keys using the Vector3.Lerp function.

What is strange is that the roation and scaling BOTH use a vector3 structure to store there roation and scaling. And yet the rotation animation works but not the scale animation.

To toggle between scaling animation and rotation animation just go into the Form1.vb file and look for the SetupAnimations method near the bottom of the file. In that method you will see a varible decloration "Dim Onlyscaling As Boolean = True" simply change it to "Dim Onlyscaling As Boolean = False" in order to view the Rotation animation.

I believe my problem lies with the Update method in the Animation.vb file. But I can't seem to figure out why.

Anybody have any idea as to why this is that case and why the animation slows down only during scaling but not when rotation?

[edit]No exe or dll files are allowed in attachements. - mutant[/edit]
 

Attachments

Last edited by a moderator:
Back
Top