Game Development Community

unset look thread(armthread)

by Mquaker · in Torque 3D Professional · 08/28/2011 (9:30 pm) · 2 replies

i set look thread for each weapon(handgun/rifle/grenade).
but, continue appear look animation when playing player death animation.
so, i try finding unset look animation when playing player death animation.

i found 'destroythread(*thread)' function.
but, i use this function... engine crash..

i try use 'mShapeInstance->destroyThread(mArmThread);' and 'mShapeInstance->destroyThread(mArmAnimation.thread);'.
but, result same.

#1
08/28/2011 (9:50 pm)
i current use some code in scripts.

if (%obj.getState() $= "Dead")
{
   %obj.setArmThread("");
}

and success unset look animation.

but, player arm angle have some problem.
#2
08/28/2011 (11:56 pm)
You have to stop the thread from advancing.
Check your state in updateAnimation().