jPCT-AE - a 3d engine for Android > Support

Detecting touch on particular position on the model

(1/1)

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.

Navigation

[0] Message Index

Go to full version