Hi
I just wanted to know if anyone can find the flaw in my animation script.
The script is really not very long and not much is going on, but still I lose around 100 FPS when it is active
var movingAnim : boolean = false;
function Update()
{
Idle();
if (Input.GetButtonDown("Forward"))
{
movingAnim = true;
}
if (Input.GetButtonUp("Forward"))
{
movingAnim = false;
}
if (movingAnim)
{
Move();
}
else if (movingAnim == false)
{
MoveToIdle();
}
}
function Idle()
{
animation.Blend("idle8-motion");
animation.Blend("flap");
}
function Move()
{
animation.Blend("8-motion");
animation.Blend("flap");
}
function MoveToIdle()
{
animation.Blend("8-motion",0,0.3);
animation.Blend("idle8-motion");
animation.Blend("flap");
}
I would really appreciate the help
thanks in advance