Replies: 1 comment
-
|
I don't think ray-casting will help you to determine whether one object includes the other one. It is easy, in 2D to come up with two objects with no intersection and for which ray casting will always collide whatever the direction you choose. E.g. a spiral like object for the large one. I'm not aware of any implementation that can do that efficiently for general non-convex mesh. I'm sure it is doable but I'm not sure what would be the best complexity you can obtain. There is no ray-casting in coal. You have to fake it with custom shapes. A thin capsule is likely the best. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I need to determine if one 3D object (either a collision object like a mesh or a single point) is fully contained inside another collision object using the coal library. My use case involves both convex and non-convex meshes, and I’d like to leverage coal’s capabilities for efficiency.
From my understanding, a general approach might involve:
Checking if the two objects intersect (if they do, the smaller one isn’t fully inside).
If no intersection, testing if a point from the smaller object is inside the larger one (e.g., using something like ray-casting from object center).
Actually I need to check collision between a ray and the mesh and count contact points.
Can I use coal’s BVH to perform some "ray-casting" efficiently? Probably I could simulate ray by some triangle?
Beta Was this translation helpful? Give feedback.
All reactions