Game Development Community

Player Animations (New Model) not showing ?

by Hewster · in Torque 3D Professional · 06/29/2009 (8:16 am) · 3 replies

Hi,

Not sure if its cos I'm doing something wrong, but I have a player model
I set-up in TGA, which works fine in TGA & ShowTool, but I can't seem to
get to work in T3D-b3, by that I mean the model shows, but no animations.

If I export the SpaceSuit player (using Max) it works ok in game
but if I try to export the ForgeSoldier it acts the same as my own model,
ie no animations.

I understand the SpaceSuit has embedded animations, and the ForgeSoldier has not.

Now, obviously someone managed to export the ForgeSoldier successfully, since
it does work in game (the supplied .dts), or perhaps the included .max file
is not the source file used to successfully export ?

I have tried using Max8 & Max9.

Before I start pulling my hair out, can anyone confirm my observations ?
Else I gota find out WTF I'm doing wrong lol

Cheers,

Hewster

#1
06/29/2009 (8:53 am)
Have you set the related cs files for your model using the new functions? Look at the stock files for the changes.

Why forge doesn't work correctly

Also "beta3 animation" is a nice search term.
www.garagegames.com/search/advanced?search=beta+3+animation&author=&from...
Have a look at the 6th result down.
#2
06/29/2009 (10:13 am)
Thanks Steve.. awesome.. now working :D

OK, it seems we have to declare in the character .cs file:

function ModelName::onLoad(%this)
{
}

Where ModelName is the name of your Char model.

Within the function be declare the sequences like so:

%this.addSequence("art/shapes/players/animations/player_root.dsq", "root");

After the function we declare the TSShapeConstructor like so:

singleton TSShapeConstructor(PlayerNameDts)
{
   canSaveDynamicFields = "1";
   baseShape = "art/shapes/players/PlayerName/PlayerName.dts";
   upAxis = "DEFAULT";
   unit = "-1";
};

Again where "PlayerName" is the name of your char model.



This is an exmple for my character named "Doctor"

function DoctorDts::onLoad(%this)
{
   %this.addSequence("art/shapes/players/animations/player_root.dsq", "root");
   %this.addSequence("art/shapes/players/animations/player_forward.dsq", "run");
   %this.addSequence("art/shapes/players/animations/player_back.dsq", "back");
   %this.addSequence("art/shapes/players/animations/player_side.dsq", "side");
   %this.addSequence("art/shapes/players/animations/player_lookde.dsq", "look");
   %this.addSequence("art/shapes/players/animations/player_head.dsq", "head");
   %this.addSequence("art/shapes/players/animations/player_fall.dsq", "fall");
   %this.addSequence("art/shapes/players/animations/player_land.dsq", "land");
   %this.addSequence("art/shapes/players/animations/player_jump.dsq", "jump");
   %this.addSequence("art/shapes/players/animations/player_diehead.dsq", "death1");
   %this.addSequence("art/shapes/players/animations/player_diechest.dsq", "death2");
   %this.addSequence("art/shapes/players/animations/player_dieback.dsq", "death3");
   %this.addSequence("art/shapes/players/animations/player_diesidelf.dsq", "death4");
   %this.addSequence("art/shapes/players/animations/player_diesidert.dsq", "death5");
   %this.addSequence("art/shapes/players/animations/player_dieleglf.dsq", "death6");
   %this.addSequence("art/shapes/players/animations/player_dielegrt.dsq", "death7");
   %this.addSequence("art/shapes/players/animations/player_dieslump.dsq", "death8");
   %this.addSequence("art/shapes/players/animations/player_dieknees.dsq", "death9");
   %this.addSequence("art/shapes/players/animations/player_dieforward.dsq", "death10");
   %this.addSequence("art/shapes/players/animations/player_diespin.dsq", "death11");
   %this.addSequence("art/shapes/players/animations/player_looksn.dsq", "looksn");
   %this.addSequence("art/shapes/players/animations/player_lookms.dsq", "lookms");
   %this.addSequence("art/shapes/players/animations/player_scoutroot.dsq", "scoutroot");
   %this.addSequence("art/shapes/players/animations/player_headside.dsq", "headside");
   %this.addSequence("art/shapes/players/animations/player_recoilde.dsq", "light_recoil");
   %this.addSequence("art/shapes/players/animations/player_sitting.dsq", "sitting");
   %this.addSequence("art/shapes/players/animations/player_celsalute.dsq", "celsalute");
   %this.addSequence("art/shapes/players/animations/player_celwave.dsq", "celwave");
   %this.addSequence("art/shapes/players/animations/player_standjump.dsq", "standjump");
   %this.addSequence("art/shapes/players/animations/player_looknw.dsq", "looknw");
   %this.addSequence("art/shapes/players/animations/player_dance.dsq", "dance");
   %this.addSequence("art/shapes/players/animations/player_range.dsq", "range");
}
//--- OBJECT WRITE BEGIN ---


singleton TSShapeConstructor(DoctorDts)
{
   canSaveDynamicFields = "1";
   baseShape = "art/shapes/players/Doctor/Doctor.dts";
   upAxis = "DEFAULT";
   unit = "-1";
};


Thanks again Steve.

Hewster
#3
06/29/2009 (4:11 pm)
Just adding this link to the fix, and explanation:
HERE