Game Development Community

Problems With Player

by Levi Putna · in Torque Game Engine · 09/15/2006 (2:18 am) · 7 replies

I have created my own player in Maya, I have exported the player as a dts and three dtq animations. I replaced the demo files with these files. However the animations are not working the player just slides across the ground.

Can somebody give me a quick checklist of things I need to do when replacing the player animations.

Also my player faces the incorrect direction, is there a way to swap the player x direction?

Thanks in advance

#1
09/15/2006 (5:11 am)
What did you name the dsq files? There is a player.cs in the player folder under data/shapes. Open the cs file up and make sure the dts and dsq is yours. Usually when player just slides accross the ground this player.cs is incorrect or not being exec at top of the player.cs in server/scripts.

Example of player.cs in the dts player folder.
datablock TSShapeConstructor(GhostDts)
{
baseShape = "./ghost.dts";
sequence0 = "./ghost_root.dsq root";
sequence1 = "./ghost_run.dsq run";
sequence2 = "./ghost_back.dsq back";
sequence3 = "./ghost_side.dsq side";
sequence4 = "./ghost_look.dsq look";
sequence5 = "./ghost_head.dsq head";
sequence6 = "./ghost_fall.dsq fall";
sequence7 = "./ghost_land.dsq land";
sequence8 = "./ghost_jump.dsq jump";
sequence9 = "./ghost_death1.dsq death1";
};

Example what goes top of player.cs in server/scripts.

exec("~/data/shapes/player/ghost.cs");
#2
09/17/2006 (2:51 am)
Yes I have checked all the names, I replaced my animations with the demo animations. So there should be no naming conflicts there.

When I export the animation from maya as a dtq file is there any particular name I need to give the sequence?

Eg, I gave the root animation the name "Sequence_root"
#3
09/17/2006 (9:26 am)
Have you created a node, with the name eg. 'root' and used the animation key frames to mark the start and end of the animation? i use max but im sure its similar.
In max the dts exporter gives you an extra helper node, which you name what the animation is called. The animation properties can be manipulated from there
#4
09/17/2006 (10:20 am)
Also, try loading the DTS and the animation in the Show Mod (or ShowToolPro) -- if it doesn't work there, it certainly won't work in the engine.
#5
09/18/2006 (5:24 pm)
Thanks everyone,

I went back and exported my player from the start, now all the animations are working. yay Only the player still walks backwards. I have tries spinning the player around in maya before exporting him but he still walks backwards. Any ideas how I can fix this in code?
#6
09/19/2006 (8:49 am)
In Max, you could also rotate the pivot (without rotating the geometry) -- don't know if Maya has a similar transform set-up or not.

I suggest adding an additional top-level node that spins the player 180 degrees, rather than trying to do it in code.
#7
09/21/2006 (5:56 pm)
Thanks for your help everyone, couldn't find a quick fix to the player walking backwards problem, I simply backtracked to an older version of my player before the bones and animations were applied, Rotated my geometry and had to reanimate the player GRRRR. All good now.

I am sure there is a way in maya to switch the - + directions of the X,Y,Z coordinates, I just couldn't find the place to do it. If anyone knows how this is done it would be great for future reference.

Thanks :o)