Detecting touch on particular position on the model

Started by subhalakshmi27, January 27, 2012, 04:42:04 AM

Previous topic - Next topic

subhalakshmi27

Hi All,

I like to know if a particular part like head or leg in the model is touched. With collision detection I am able to get the polygon ID. As Polygon ID is generated by the JPCT_AE system, will I be able to map the model with polygon ID and know which particular part is touched?

Or do I need to make head and leg as separate meshes so that I can detect using collision detection?


Thanks,
Subha

EgonOlsen

You have to figure that out on your own. jPCT-AE can't possibly know which polygon belongs to which part, because it doesn't know of any parts in the model. For legs and arms, you might be able to use the PolygonManager to loop through all polygons once and create a list of id 2 part simply based on their spatial position in object space.