Game Development Community

t2dShape3D

by Isaac Mensah · in iTorque 2D · 06/27/2009 (11:32 am) · 6 replies

Can anyone point me in the right direction(documentation link or other) to find more information about t2dShape3D. i can't seem to find it in the docs.
Is it possible to use animation stored in this object rather than sprite based animation?

Thanks

#1
06/29/2009 (8:10 am)
I have worked with the t2dShape3D class a little bit. Yes, you can use animations built into the shapes. It isn't really a well documented class... even if you aren't a C++ programmer, I recommend checking out the class in the engine code, simply because it lists out all of the script functions that the class can use.

Open up /source/T2D/t2dShape3D.cc and search in there for 'ConsoleMethod'. You will find lines that look like this:

ConsoleMethod(t2dShape3D, setShape, bool, 3, 3, "( shapeFile$ ) - Loads a shape into the object."
			  "@param shapeFile The file where shape is stored."
			  "@return Returns true on success and false otherwise.")

The second word after the ( is the method name. So in this case, it is setShape.

Search through for the Console Methods in that file and you will see everything you can do with it - even without the documentation, that should give you a pretty good idea of what can be done with the class..

Also, here is the method that plays animations for it:
ConsoleMethod(t2dShape3D, playAnimation, bool, 3, 5, "( animationName, [startTime], [transitionTime] ) - Plays an Animation by Sequence Name.\n"
			  "@param animationName The internal name of the desired animation.\n"
			  "@param startTime (optional) The start time to set (default 0.0f)\n"
			  "@param transitionTime The transition time between animations (default 0.0f)\n"
			  "@return Returns true on success.")
#2
06/29/2009 (8:23 pm)
Hi Dave,
Thanks a lot for tpointing me the right direction. It helps a lot

Cheers!
#3
06/29/2009 (8:25 pm)
No problem - glad I could help!
#4
08/13/2009 (5:52 am)
Dave: if you work with t2dShape3D how did you solve this problem - http://www.garagegames.com/community/forums/viewthread/85425
#5
08/13/2009 (10:18 pm)
Hrm... I haven't had any depth rendering problems when using 3D models, however I haven't used them very extensively. Anytime I have used them however has worked without a problem. I've been able to go as far as have a 3D model on the screen that would rotate in real-time as you rotated the iPhone, and saw no rendering issues... I don't doubt there may be a problem, I just haven't seen it myself.

I see that post says that "models don't render correctly" - could you post a screenshot of what you're seeing? I'm curious as to what's going on that I'm not seeing... wondering if I can reproduce it...
#6
08/13/2009 (11:13 pm)
Dave: check this http://www.garagegames.com/community/forums/viewthread/99579 if you find how to fix it will be great