Hi
I was doing the same thing.
I liked the IDEA ONE but i have a few doubts
The code I use to calculate distance is
if(pcBot.calcMinDistance(pcBot.getTransformedCenter(), myBot.getTransformedCenter(), 8)!=Object3D.COLLISION_NONE){
Log.e("Collision detected","i have hit the pc bot");
soundPool.play(punchId, 1, 1, 0, 0, 1);
soundPool.play(moanId, 1, 1, 0, 0, 1);
}
(Not correct
as the distance between head and punch is to be calculated not between their centers. And the punch is moving).
I would like to check if there is any object within the 5*5*5 ellipsoid/sphere etc.
Is there any way to do that.
?
Also if I continue use
public float calcMinDistance(SimpleVector org,
SimpleVector dr,
float ignoreIfLarger)
What parameters should be used for "org" and "dr" ? org should be pcBot's head and dr should be myBot's fist(How to find them??) pcBot's head can be approximated but how the fist? As its moving .
Thanks in advance.