Author Topic: checkForCollision and concave/hollow objects  (Read 1062 times)

Offline neo187

  • int
  • **
  • Posts: 73
    • View Profile
checkForCollision and concave/hollow objects
« on: January 03, 2012, 10:19:53 pm »
Hi Egon

I have only tried this with checkForCollisionEllipsoid, but basically I have the mesh for the four walls of a room and its pavement (all one mesh). If I place the character inside it the check always registers a collision, basically making the character never move. I tried putting the character at different positions inside the room mesh and always no movement. If however I import each of the four walls as distinct objects then the collisions works as expected...

Just checking, is this meant to happen? I am setting each object to CHECK_OTHERS and the character to CHECK_SELF, I have tried with different dimensions for the ellipsoid, from (1, 1, 1) to (10, 10, 10), always same result....


Thank you very much

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: checkForCollision and concave/hollow objects
« Reply #1 on: January 03, 2012, 10:30:47 pm »
No, this isn't meant to happen and i never experienced anything like that except when the character starts of in the ground. Ellipsoid collision detection is vor collision avoidance, which means that it can't resolve existing collisions that are already present when you call the method, i.e. if the center of the ellipsoid lies in the ground plane (for example), nothing will happen (in most cases...). Maybe this is the problem here? If not, i need the model an a simple test case to see what's happening here.

Offline neo187

  • int
  • **
  • Posts: 73
    • View Profile
Re: checkForCollision and concave/hollow objects
« Reply #2 on: January 04, 2012, 04:02:43 pm »
Right, it turns out to be the ellipsoid size.... Not being able to see it I guess can easily induce the mistake of making it too big, which results in the problem above...

Thank you for your prompt reply!