Game Development Community

Adding new Collidable Object

by Xavier "eXoDuS" Amado · in Torque Game Engine · 07/01/2002 (9:17 am) · 7 replies

I was trying to add some code to make a new object, turrets. I'm trying to make the object collidable with, currently the player passes through it, i did look at game/objectTypes.h and console/objectTypes.h and defined my new object type in both of the files but still no go... anyone else can point me somewhere?
I did a search for other similar types, like VehicleObjectType, but i only find the references in the two files i just mentioned

Thanks in advance.

#1
07/01/2002 (9:20 am)
X,

Going out on a limb here, if I am off base or wrong please flog me accordingly ;)

Could it be a mask type thing? that is players are being masked out thus not allowing them to collide?

-Ron
#2
07/01/2002 (11:37 am)
Did you add your new type to sCollisionMask in the player.cc ?
#3
07/01/2002 (11:54 am)
Did my off the cuff from left field guess actual pan out to be true?

static U32 sCollisionMoveMask = (TerrainObjectType      | InteriorObjectType   |
                                 WaterObjectType        | PlayerObjectType     |
                                 StaticShapeObjectType  | VehicleObjectType    |
                                 ForceFieldObjectType |
                                 PhysicalZoneObjectType | StaticTSObjectType);

looks like you just need to add the type to the mask X.

-Ron
#4
07/01/2002 (1:17 pm)
Argh, guess that should do it... but... why the hell my visual studio isn't searching inside .cc files :\
It only searched on headers that's why i only saw the references to VehicleObjectType from the objectTypes.h headers... thanks guys, gonna figure this vc++ problem and then add my object to that mask.. thanks!
#5
07/01/2002 (1:22 pm)
X,

I had to add "*.cc;*.cs" (without the "'s) at the end of the search string line

the complete line looks like this

In files/file types: *.c;*.cpp;*.cxx;*.tli;*.h;*.tlh;*.inl;*.rc;*.cc;*.cs

-Ron
#6
07/01/2002 (1:59 pm)
Yes that was the problem, I was used to have that already, but i reinstalled everything recently and forgot about that :)
Thanks again
#7
07/01/2002 (3:03 pm)
NP!

Thats what we are here for, to help each other out!

-Ron