Game Development Community

T2dShape3D transition time

by Chris Labombard · in Torque Game Builder · 03/10/2006 (4:29 am) · 1 replies

From this page of the wiki. :

Quote:Transition Time; this is the time it takes for the new animation to take effect. When you start an animation, T2D will blend any existing animation with the new one. This blending means that you can gradually start an animation rather than abruptly changing it. The default, if not specified, is "0" e.g. instant change of animation.

I have set up the t2dShape3d source code to callback to the script when it is 0.5 seconds from finishing the animation.

In the callback I blend in my new animation which is selected by the user. This all works perfectly.

The problem is, if the user didn't select an animation before time ran out I play a generic animation while I wait for them to select one. The next animation they select immediately gets blended in.

When I blend in the new animation and the old animation isn't almost complete, the player moves a very small amount and the old animation just keeps on playing.

I'm using:
$player1.playAnimation(myNewAnimation, 0, 0.5); // This is being called properly.

This seems like a bug to me. Shouldn't it transition to the new animation and then continue to play it?

About the author

I have been a professional game programmer for over 5 years now. I've worked on virtually every platform, dozens of games and released a few of my own games, including 2 iPhone titles and a title waiting release on Big Fish Games.


#1
03/16/2006 (9:09 am)
I found the bug... It was a bug in my code, the T2D source works fine.