Smoothly transitioning from animation to animation
by Jinnie Ong · in Torque 3D Professional · 02/11/2010 (9:28 pm) · 3 replies
Hi all, I'm having difficulty with transitioning from one animation to another smoothly. What I'm trying to do is to have a group of soldiers standing up and running when moving from point to point, but when they're fully idle, to go into crouch position.
To accomplish this, I named the crouch position as Root and the run animation as, well, run. However, as these soldiers (of AIPlayer class) move from position to position, they sometimes have to stop a few times along the way which causes them to go from run position to crouch multiple times.
I then tried making Root to be the standing position, and set animation to crouch only if they've been in a specific position for more than 2 seconds. I tried using both setActionThread and playThread/stopThread but both caused the soldiers to begin floating whenever they started moving around.
After searching for this, it seems that many others are having the same problem, but no solution has been found. Is there really no solution for this (except to delve really deeply into the source code) or is the solution just very well hidden?
Any help would be greatly appreciated!
To accomplish this, I named the crouch position as Root and the run animation as, well, run. However, as these soldiers (of AIPlayer class) move from position to position, they sometimes have to stop a few times along the way which causes them to go from run position to crouch multiple times.
I then tried making Root to be the standing position, and set animation to crouch only if they've been in a specific position for more than 2 seconds. I tried using both setActionThread and playThread/stopThread but both caused the soldiers to begin floating whenever they started moving around.
After searching for this, it seems that many others are having the same problem, but no solution has been found. Is there really no solution for this (except to delve really deeply into the source code) or is the solution just very well hidden?
Any help would be greatly appreciated!
#2
02/12/2010 (9:05 am)
lol, I remember using that fix for TGE!
#3
02/17/2010 (2:30 am)
Thanks! I tried the fix, but that didn't correct the issue in its entirety (though it did reduce the number of times they spaz'ed on the spot). A quick change to prevent slow down in setMoveDestination() stopped them from spaz'ing entirely.
Associate Manoel Neto
Default Studio Name
When the AIPlayer ticks without receiving a ghost update (very common stuff if you have a dozen or so of them running around and didn't increase the packetsize), they'll update with a NULL move, which causes them to stop whatever they were doing.
I can't believe this hasn't been fixed in T3D - it's an very old bug, and pretty easy to fix. Check this resource:
www.torquepowered.com/community/resources/view/11218