Hero Tracer 2D
by rennie moffat · in Torque Game Engine · 07/19/2009 (10:14 am) · 2 replies
HI, I would like to make a tracer that would follow my hero, and would be variant on acceleration. EX. I drag my player to the right at X speed the tracer follows behind. and coils up in, disappears when the player stops. If I move him faster, the tracer is more spread out, but eventually catches up and recoils when the player stops, hits zero acceleration
Any tips?
Any tips?
About the author
My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.
#2
function PlayerClass::onAddToScene(%this, %scenegraph)
{
...
// Register Animation States.
%this.registerAnimationState( "up" );
%this.registerAnimationState( "down" );
%this.registerAnimationState( "left" );
%this.registerAnimationState( "right" );
...
}
function PlayerClass::enterUpAnimationState(%this)
{
return "upAnimation";
}
function PlayerClass::executeUpAnimationState(%this)
{
}
My question is, with in the execute function, what should I declare? what the actual up animation is? I don't think so. Is it the movement of the mouse? Anything? this is where I am getting lost.
07/20/2009 (10:16 am)
ok so i am thinking this code may work in terms of the direction, tho it is not nailed yet.function PlayerClass::onAddToScene(%this, %scenegraph)
{
...
// Register Animation States.
%this.registerAnimationState( "up" );
%this.registerAnimationState( "down" );
%this.registerAnimationState( "left" );
%this.registerAnimationState( "right" );
...
}
function PlayerClass::enterUpAnimationState(%this)
{
return "upAnimation";
}
function PlayerClass::executeUpAnimationState(%this)
{
}
My question is, with in the execute function, what should I declare? what the actual up animation is? I don't think so. Is it the movement of the mouse? Anything? this is where I am getting lost.
Torque Owner rennie moffat
Renman3000
And I am unsure how to do this. Is there a simple way, with out major coding to do this?