Game Development Community

OjectTypes oddity....

by James Urquhart · in Torque Game Engine · 01/13/2004 (4:04 am) · 7 replies

I was just looking in objectTypes.h, and i found a rather odd mask that is in there :

StaticTSObjectType =          bit(24),

Ok, sure, its used by things such as the tsStatic class :
mTypeMask |= StaticObjectType | StaticTSObjectType | StaticRenderedObjectType;

But then again, practically no code really seems to take into account the StaticTSObjectType (as in, has masks to collide with it, etc), except for perhaps the foliage replicator.

I also found this type :

StaticShapeObjectType =       bit(13),

This is the type used by the staticShape class (which is derived from ShapeBase, unlike tsStatic). This seems like a much better implementation of static shapes than tsStatic!

What on earth is going on?

#1
01/13/2004 (8:43 am)
There are 2 types of static objects using TS meshes :)
#2
01/13/2004 (8:52 am)
Hey James,

You'll find that code to be useless, I know I did. Most objects in Torque use the wrong mask. For instance, the last head I pulled down the sun has a StaticTS... mask. I reported this a while ago, but nothing happened with it.

www.garagegames.com/mg/forums/result.thread.php?qt=12931

Hopefully this will save you some time and frustration.

John.
#3
01/13/2004 (8:59 am)
Thanks bob.

I kind of realised there are 2 types of static mesh (tsStatic seems to be the one in the Static Shapes block in the world editor).

However, it would be more beneficial to rip out tsStatic, since one is not going to be duplicating ShapeBase code in order to get a simple static shape into the game.

Sure, you'd break a bit of the world editor, but how hard is it to make it use staticShape instead of tsStatic?

-James
#4
01/13/2004 (10:30 am)
I'm not sure I understand, why do you want to remove TSStatics?
#5
01/13/2004 (10:45 am)
Its easy to make it create ANY type of object :) but I'd rip out the statics that USE shapebase rather than the ones that dont.. personally.

Unless thats what youre saying :)
#6
01/13/2004 (11:19 am)
Anyway, thanks for the helpful advice on this topic.

I was thinking of removing tsStatic since i don't really need it.... I can live without static shapes in the world editor :) (since any object i will implement will have some possible dynamic nature).
#7
01/13/2004 (11:57 am)
TSStatics very lightweight, but completely static.
StaticShape heavier weight, but supports things like animation.

Personally I use both, but everyone's needs are different.

Hope this helps.

John.