How get spatial collision points?

Hello everybody!
Can someone explain to me how you can get coordinates of points of intersection of two spatials? I always error occurs UnsupportedCollisionException. In the picture I try to find the coordinates of yellow dots. How can you implement it?

P.S. I use JME 3.1

You can’t.

It’s a fundamental misunderstanding on your part about collisions. There are an infinite number of collision ‘points’ in your picture:

Simple ‘point-based’ collision cannot cover this case and so collideWith() can never handle it.

There is not much you can do with the information anyway.

Can you explain what you are really trying to do and maybe we can help with that? Certainly you have painted yourself into some kind of corner… we need to figure out the right corner for you. :slight_smile:


pspeed, thanks for the answer.
I’m trying to create a game similar to Flood It but in 3D. With the basic shape is set blender icosphere. That’s part of the figure.

I need to find a triangles (red) that touch the central triangle (blue). We must know the number of points of intersection to eliminate unnecessary triangleswhich also touch the central triangle (yellow and gray). I was able to implement it without intersections, writing all the neighbors of each triangle in the neighborhood, but it is a very hard work + need a new array for each new figure. In this example, each face shape - a separate Geometry,so maybe it will be easier to get the coordinates of all points of each triangle and verify them through the equals (). But I do not know how to get this information for each triangle in Spatial. … Maybe there is another way of solving this problem ? :frowning:

Grab the mesh. Iterate over the triangles.

Where do the triangles come from in the first place?

pspeed, seems happened. I got the coordinates for each face from mesh. Thanks for the help. :slight_smile:

How to find vertex in mesh I went through this a while back.

EDIT: I should say getting the information for triangles is about the same for vertices.