How to determine if physics body is inside of a TriangleMesh
Forum » General / Help » How to determine if physics body is inside of a TriangleMesh
Started by: Jacc (guest)
On: 1257849871|%e %b %Y, %H:%M %Z|agohover
Number of posts: 3
rss icon RSS: New posts
How to determine if physics body is inside of a TriangleMesh
Jacc (guest) 1257849871|%e %b %Y, %H:%M %Z|agohover

Hi,

The problem I have is I have two physics objects. One is a large TriangleMeshObject and the other is a small sphere. The TriangleMeshObject is very large compared to the sphere and I want the sphere to be able to move inside of the TriangleMeshObject. This if fine and I have this working. The problem is, is that I want to detect whether the sphere is inside the volume of the TriangleMeshObject, in other words I want the TriangleMeshObject to act like a trigger volume. Is it possible using JigLibX to detect if a physics primitive is inside of a TriangleMeshObject?

The reason I want this is that I can detect that there is a collision between the TriangleMeshObject's edges and the sphere, but I cannot detect collision once the sphere is inside of TriangleMeshObject - but this is what I would like.

Thanks for any help

unfold How to determine if physics body is inside of a TriangleMesh by Jacc (guest), 1257849871|%e %b %Y, %H:%M %Z|agohover
Re: How to determine if physics body is inside of a TriangleMesh
jacc (guest) 1258022245|%e %b %Y, %H:%M %Z|agohover

Does anyone have any possible solutions for this at all? It kind of seems something should be part of JigLibX, its just I'm not sure where it is - or is this not the case?

unfold Re: How to determine if physics body is inside of a TriangleMesh by jacc (guest), 1258022245|%e %b %Y, %H:%M %Z|agohover
Re: How to determine if physics body is inside of a TriangleMesh
PGlynnPGlynn 1258066583|%e %b %Y, %H:%M %Z|agohover

from testing with triangle meshes that have interiors performance really drops.

however you can use the collision skin with a custom collision predicate function. This will allow collision to not take place but let you use the event as a notification of entry (i've heard someone on the forms here call this phantom physics, which i believe relates to havok terminology). I would do this with a box over your triangle mesh.

Take a look at this tutorial and see if any of it could apply to your situation. http://jiglibx.wikidot.com/catch-collisionevents

New post
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License