Static Shape Blending
by Andres Bordeu · in Technical Issues · 08/11/2009 (7:54 am) · 0 replies
Hello!
I have a StaticShape with some animations, and I want to change between them with a blending animation.
This is my code:
///Datablock of the StaticShape elephant
datablock StaticShapeData(static_shape_elephant)
{
category = "Misc";
shapeFile = "art/shapes/elephant/elephant_anims.dts";
};
///Function of the trigger that controls the elephant animations
function trigger_elephant::onEnterTrigger(%this,%trigger,%obj)
{
elephant.schedule(0,"playThread",0,"walk");
elephant.schedule(20000,"stopThread",0);
elephant.schedule(20001,"playThread",1,"idle1");
Parent::onEnterTrigger(%this,%trigger,%obj);
}
As you can see, the trigger_elephant will change animation "walk" to "idle1" but instantaneously. I want to know how I can blending between both animations.
Thanks!
I have a StaticShape with some animations, and I want to change between them with a blending animation.
This is my code:
///Datablock of the StaticShape elephant
datablock StaticShapeData(static_shape_elephant)
{
category = "Misc";
shapeFile = "art/shapes/elephant/elephant_anims.dts";
};
///Function of the trigger that controls the elephant animations
function trigger_elephant::onEnterTrigger(%this,%trigger,%obj)
{
elephant.schedule(0,"playThread",0,"walk");
elephant.schedule(20000,"stopThread",0);
elephant.schedule(20001,"playThread",1,"idle1");
Parent::onEnterTrigger(%this,%trigger,%obj);
}
As you can see, the trigger_elephant will change animation "walk" to "idle1" but instantaneously. I want to know how I can blending between both animations.
Thanks!