Author Topic: Detecting touch on particular position on the model  (Read 846 times)

Offline subhalakshmi27

  • byte
  • *
  • Posts: 21
    • View Profile
Detecting touch on particular position on the model
« on: January 27, 2012, 04:42:04 am »
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11747
    • View Profile
    • http://www.jpct.net
Re: Detecting touch on particular position on the model
« Reply #1 on: January 27, 2012, 07:48:34 am »
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.