Game Development Community

InitContainerRadiusSearch with $TypeMasks::MarkerObjectType

by Mathieu · in Torque Game Engine · 10/30/2006 (2:00 pm) · 4 replies

Did anyone had any success using InitContainerRadiusSearch with $TypeMasks::MarkerObjectType?

Example:
I want to find all MissionMarker around my player so I use something like this:
InitContainerRadiusSearch(%obj.getPosition(), 100, $TypeMasks::MarkerObjectType);
But the resulting container is always empty...
Note that it's working if I use a different mask ("$TypeMasks::ShapeBaseObjectType" for example), so this part of my code must be OK.


I added "MarkerObjectType" to mTypeMask of MissionMarker (missionMarker.cc) but it still not working.
MissionMarker::MissionMarker()
{
   mTypeMask |= StaticShapeObjectType | StaticObjectType [b]| MarkerObjectType[/b];
   mDataBlock = 0;
   mAddedToScene = false;
   mNetFlags.set(Ghostable | ScopeAlways);
}

#1
11/01/2006 (5:02 am)
Nobody tried this kind of InitContainerRadiusSearch?
#2
11/01/2006 (2:40 pm)
Is this in 1.5? I am having trouble doing CastRay and InitContainerSearch as well. I am attempting to do it to try and find ItemObjectType's, but don't get anything. PlayerObjectType always works.
#3
11/01/2006 (2:51 pm)
Yes, I'm using TGE 1.5 but I remember having the same issue with TGE 1.4 months ago.
#4
11/01/2006 (3:02 pm)
I made a thread in the Engine section detailing my issue. The code I used worked in 1.4.2 but does not work in 1.5.