Object3D.checkForCollision(Object3D)...

Started by AGP, March 10, 2010, 07:38:45 PM

Previous topic - Next topic

AGP

...would be extremely helpful so I could hold the primitive I'm using for my collision-detection, and, when having problems, (as I am now), I could draw it and know where it is. VERY helpful for debugging. Please?

EgonOlsen

I'm not sure if i understand what this is supposed to do. Should it only check for collision with on particular object or should it extract direction and position vector somehow from the second object and run a collision detection with that against all objects...or something else...!?

AGP

Well, it should act like the Object3D.checkForCollisionEllipsoid method does, only I would get to draw the ellipsoid to see where the collision ought to be happening.

EgonOlsen

So your intention is to get the first contact point of the collision to draw some debug object at that position? I could extend the CollisionEvent so that it can be questioned about the position of the first contact. Is that sufficient?

EgonOlsen

#4
Ok, i've uploaded a version that includes the mentioned change in the CollisionEvent. The method is named getFirstContact(), the jar is here: http://www.jpct.net/download/beta/jpct.jar

This is not exactly what you had in mind, but i hope it helps anyway.

AGP

Thanks a lot, I'll check it out and tell you about it.