Game Development Community

is there a typemask for prefabs?

by x-ming-x · in Torque 3D Professional · 04/10/2011 (10:19 am) · 1 replies

Hi

im using a raycast to interct with objects, im trying to work out the type mask or some way of returning the parent prefab of an object i select

eg i have a prefab made of models
if i raycast at it i get back the component models depending on typemask no problem
but i want to be able to click on any component of a prefab and have it return the parent prefab info

(as i beleive happens in the editor when you mouse select prefabs)

so far i can only make out that prefabs are of staticshape type but when using this typemask i cant get it to return the prefab only the static shapes inside.

any help much appreciated ;)

About the author

ive been making games since they used to be on floppy discs, ive been all over the industry and worked for / with all types of companies, big and small. Now im lucky enough to be indie and working full time for myself and my team :)


#1
04/11/2011 (8:46 pm)
I'm not 100% sure what you are trying to do but in prefab.cpp it has:
mTypeMask |= StaticObjectType;
so they are staticObjects and $TypeMasks::StaticObjectType should be the mask to use in a raycast.