Author Topic: Object3D.checkForCollision(Object3D)...  (Read 1738 times)

Offline AGP

  • quad
  • ******
  • Posts: 1515
    • View Profile
Object3D.checkForCollision(Object3D)...
« 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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Object3D.checkForCollision(Object3D)...
« Reply #1 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...!?

Offline AGP

  • quad
  • ******
  • Posts: 1515
    • View Profile
Re: Object3D.checkForCollision(Object3D)...
« Reply #2 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Object3D.checkForCollision(Object3D)...
« Reply #3 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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: Object3D.checkForCollision(Object3D)...
« Reply #4 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

This is not exactly what you had in mind, but i hope it helps anyway.
« Last Edit: March 10, 2010, 11:09:22 pm by EgonOlsen »

Offline AGP

  • quad
  • ******
  • Posts: 1515
    • View Profile
Re: Object3D.checkForCollision(Object3D)...
« Reply #5 on: March 10, 2010, 11:21:01 pm »
Thanks a lot, I'll check it out and tell you about it.