Game Development Community

Using pickRect() with a specific layer

by Christos Karapiperis · in Torque Game Builder · 10/06/2006 (4:12 am) · 3 replies

Hi,
How exactly am I gonna use pickRect() in order to choose objects from a specific layer, e.g. layer 9?
I know that there is the layerMask option in pickRect() but I can't get it working. It seems that I have a difficulty in understanding how bit masks work exactly.
Thanks.

#1
10/06/2006 (5:24 am)
To specify a layer when a layerMask parameter is expected use BIT(#) to express a layer number; BIT(9) for example. I believe you can also combine those in the following manner: BIT(1) | BIT(5) | BIT(9)
#2
10/06/2006 (5:34 am)
Thanks but it doesn't work. I believe it has something to do with the groupMask. What about that?
What's the default value? I want to choose only the objects from a specific layer.
Thanks
#3
10/06/2006 (5:48 am)
Thanks but it doesn't work. I believe it has something to do with the groupMask. What about that?
What's the default value? I want to choose only the objects from a specific layer.
Thanks