Game Development Community

LayerMask

by Jeremy Alessi · in Torque Game Builder · 10/30/2006 (10:21 pm) · 1 replies

I'm attempting to use PickPoint() and I only want to list objects in group 0 and layer 4. Unfortunately, I don't seem to be getting the desired result. If I don't pass a groupmask and layermask it returns all the objects intersecting the point. If I pass groups "0 1 2 3 4 5 6" I don't get a result but if I pass groups "1 2 3 4 5 6" then I do. As for the layers ... I seem to get nothing back no matter what unless I pass nothing.

#1
11/01/2006 (2:11 pm)
They are stored as a bitmask. You want to do:

%layerMask = BIT(4);
%groupMask = BIT(0);

The BIT function just returns 1 << arg.