www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: AGP on March 10, 2010, 07:38:45 pm

Title: Object3D.checkForCollision(Object3D)...
Post by: AGP on March 10, 2010, 07:38:45 pm
...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?
Title: Re: Object3D.checkForCollision(Object3D)...
Post by: EgonOlsen on March 10, 2010, 09:09:10 pm
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...!?
Title: Re: Object3D.checkForCollision(Object3D)...
Post by: AGP on March 10, 2010, 09:16:51 pm
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.
Title: Re: Object3D.checkForCollision(Object3D)...
Post by: EgonOlsen on March 10, 2010, 10:25:19 pm
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?
Title: Re: Object3D.checkForCollision(Object3D)...
Post by: EgonOlsen on March 10, 2010, 10:59:13 pm
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 (http://www.jpct.net/download/beta/jpct.jar)

This is not exactly what you had in mind, but i hope it helps anyway.
Title: Re: Object3D.checkForCollision(Object3D)...
Post by: AGP on March 10, 2010, 11:21:01 pm
Thanks a lot, I'll check it out and tell you about it.