3d objects made in TGB editor and animations
by Tobiah Marks · in Torque Game Builder · 09/16/2006 (8:54 pm) · 3 replies
Hey there.
I've gotten to the point where i've placed my .dts file in my data/shapes/ folder, and saw it in the TGB. I dragged and droped it into my level, gave it a scripting name, and have been able to run my code on it (run around, jump, etc)
My question is, how do I get animations in?
Reading the tdn ( http://tdn.garagegames.com/wiki/Torque_2D/T2D_3DShapes ), I know I have to use datablock TSShapeConstructor(...), but I didn't make the object in the scripter, so I don't know where that should go. I've been messing around trying to get it to work but I can't find out where in the code it contrusts 3d objects that were placed in the edittor
Can you offer someone new to torque any insight?
Thank you,
-T
I've gotten to the point where i've placed my .dts file in my data/shapes/ folder, and saw it in the TGB. I dragged and droped it into my level, gave it a scripting name, and have been able to run my code on it (run around, jump, etc)
My question is, how do I get animations in?
Reading the tdn ( http://tdn.garagegames.com/wiki/Torque_2D/T2D_3DShapes ), I know I have to use datablock TSShapeConstructor(...), but I didn't make the object in the scripter, so I don't know where that should go. I've been messing around trying to get it to work but I can't find out where in the code it contrusts 3d objects that were placed in the edittor
Can you offer someone new to torque any insight?
Thank you,
-T
About the author
#2
09/16/2006 (9:35 pm)
Ah yes! That worked. I guess the trick was the input to that function being the name of my object.
#3
11/17/2006 (7:20 pm)
Tobiah if you have a purchased version of TGB you can jump over to the TDN under developments link on GG site. There is a 3d object tutorial there that takes you though getting a 3d object into your level, orienting it, and animating it.. also some LOD stuff too.
Torque Owner Dave D
datablock TSShapeConstructor(p3DGuy) { baseShape = "~/data/shapes/player/soldier.dts"; sequence0 = "~/data/shapes/player/root.dsq stand"; sequence1 = "~/data/shapes/player/root2.dsq idle2"; sequence2 = "~/data/shapes/player/run.dsq run"; sequence3 = "~/data/shapes/player/jump.dsq jump"; sequence4 = "~/data/shapes/player/fall.dsq fall"; sequence5 = "~/data/shapes/player/death.dsq death"; };I place this in my player.cs file, and just made sure it was loaded before I called the animations from script.
Edit: damn touchpad
I just called the animations from script as I didn't see any place in the editor to "load" them up