StaticTSObjectType != TSStatic
by John Kabus (BobTheCBuilder) · in Torque Game Engine · 09/22/2003 (10:11 am) · 5 replies
Ok last bug...
Almost all of the community resources that have been added to the engine initialize their classes with:
mTypeMask |= StaticObjectType | StaticTSObjectType | StaticRenderedObjectType;
even though the majority of the objects derive from SceneObject. This TOTALLY breaks any code that queries by object type or am I using this wrong?
Any object that meets the condition:
(object->mTypeMask & StaticTSObjectType)
should be a descendent of TSStatic right?
Thanks...
John.
Almost all of the community resources that have been added to the engine initialize their classes with:
mTypeMask |= StaticObjectType | StaticTSObjectType | StaticRenderedObjectType;
even though the majority of the objects derive from SceneObject. This TOTALLY breaks any code that queries by object type or am I using this wrong?
Any object that meets the condition:
(object->mTypeMask & StaticTSObjectType)
should be a descendent of TSStatic right?
Thanks...
John.
#2
Thanks Ben...
John.
Edit: msword characters...
09/22/2003 (3:52 pm)
Cool, I wasn't sure if I was misusing the type variable or not (wouldn't be the first time :) ).Thanks Ben...
John.
Edit: msword characters...
#3
(I've discovered this while updating our in-game map, so it will not render the grass but only static shapes placed in world... and found that normal static shape have the same mask as foliage and grass replicated "objects", odd.
01/31/2008 (4:27 am)
Just to add something: most of non-shape rendered objects in Torque have StaticTSObjectType in mTypeMask (like fxFoliageReplicator, fxLight, etc), so looks like the "bug" is still exists.(I've discovered this while updating our in-game map, so it will not render the grass but only static shapes placed in world... and found that normal static shape have the same mask as foliage and grass replicated "objects", odd.
#4
$Waypoint[$WPIndex] = new volumeLight() {
position = %px SPC %py SPC %pz;
rotation = "0 0 1 180";
scale = "1 1 1";
dataBlock = "BlueWaypointDataBlock";
%mask = $TypeMasks::StaticTSObjectType | $TypeMasks::InteriorObjectType;
InitContainerRadiusSearch(%position, %radius, %mask);
%halfRadius = %radius / 2;
while ((%targetObject = containerSearchNext()) != 0)
{
This light causes a collision hit? I take it out, no collision...
Any help here ?
02/28/2008 (5:25 am)
I have a collision test using StaticTSObjectType as a mask and I get a collision hit on a volumelight.$Waypoint[$WPIndex] = new volumeLight() {
position = %px SPC %py SPC %pz;
rotation = "0 0 1 180";
scale = "1 1 1";
dataBlock = "BlueWaypointDataBlock";
%mask = $TypeMasks::StaticTSObjectType | $TypeMasks::InteriorObjectType;
InitContainerRadiusSearch(%position, %radius, %mask);
%halfRadius = %radius / 2;
while ((%targetObject = containerSearchNext()) != 0)
{
This light causes a collision hit? I take it out, no collision...
Any help here ?
#5
06/30/2008 (9:56 am)
Hmm yes, I just ran across this issue. I had assumed StaticTSObjectType was only for TSStatics, and all those fx objects surely have no right to have that mask? Also MissionMarker objects.
Associate Kyle Carter