Detecting 3DShape Animation Triggers
by Robert DeMaria · in Torque Game Builder · 05/11/2006 (8:06 pm) · 1 replies
I'm trying to detect animation triggers from a 3D shape. The animation will play properly, but the animation triggers will not be detected. All I'm doing is the following:
datablock TSShapeConstructor(trigTestDTS)
{
baseShape = "~/data/shapes/trig_test/ed.dts";
sequence0 = "~/data/shapes/trig_test/ed.dsq stand";
};
$trigTest = new t2dShape3D()
{
scenegraph = t2dscene;
};
$trigTest.setShape("~/data/shapes/trig_test/ed.dts");
$trigTest.setTriggerActive(true);
$trigTest.playAnimation("stand");
$trigTest.setSize("40 40");
...
function t2dShape3D::onAnimationTrigger(%this,%triggerChannel)
{
echo("REACHING HERE!!!!");
}
I'm not sure if it's something I'm doing wrong, a bug, or if there is something wrong with animation I'm using. I'd really appreciate it if someone posted a .dts model and a .dsq animation with triggers that are supposed to work properly.
datablock TSShapeConstructor(trigTestDTS)
{
baseShape = "~/data/shapes/trig_test/ed.dts";
sequence0 = "~/data/shapes/trig_test/ed.dsq stand";
};
$trigTest = new t2dShape3D()
{
scenegraph = t2dscene;
};
$trigTest.setShape("~/data/shapes/trig_test/ed.dts");
$trigTest.setTriggerActive(true);
$trigTest.playAnimation("stand");
$trigTest.setSize("40 40");
...
function t2dShape3D::onAnimationTrigger(%this,%triggerChannel)
{
echo("REACHING HERE!!!!");
}
I'm not sure if it's something I'm doing wrong, a bug, or if there is something wrong with animation I'm using. I'd really appreciate it if someone posted a .dts model and a .dsq animation with triggers that are supposed to work properly.
Torque Owner Robert DeMaria
Edit: This isn't actually a bug. In case anyone else wants to know, Torque won't detect animation triggers unless the bounding box of your shape has keyframes at the same time as the animation triggers.