Collision (Intersection): meshmesh possible?

Hi all,

I have little problems with Collision (Intersection - I don’t want to use Physic). As far as I found out Collision is only possible between Mesh and Ray or Mesh and BoundingVolume. The problem is that a BoundingBox plus another BoundingBox is a bigger BoundingBox not a “Node” containing those two Boxes. I need more precision on that.

For example one spaceship hast the form of a big Donut, with an other ship I should be able to fly through the Ring.

How can I solve this problem?



I don’t think this is possible with bounding volumes. You can use collisionshapes. But you will not be able to do collisions between 2 perfect mesh collision shapes, at least 1 of them needs to be a simple collision shape, or compound collision shape. And if these objects are moving as well your gonna want them to be simple/compound anyway.

You can simply still use jbullet for that, it has efficient intersection methods, you don’t need to “use physics” for that. Otherwise its just geometry vs bounding volumes.

The only way with jbullet I know is over Physic. How can I use it without Physic?

Should I create a own RigidBodyControl?

Yeah, just create RigidBodies with collision shapes and do ray or sweep tests against them using the methods in PhysicsSpace. Set the RigidBodies to kinematic mode so they are only influenced by the spatulas location and not the other way round.

1 Like

So I make my own RigidBodyControl wich is kinematic internal but from the outside it’s not. If it woud be kinamatic from outside, no ship collides another (kinematic collides kinematic).

normen gave you the right solution. If you require physics, you can turn off kinematic when they collide, by listening for collisions.

Sorry, but I’m not getting it. How can I use sweep tests and what are they good for (my english isn’t so good)?

I just want to move my objects in a non physic way but they should collide with each other. If a collision happens a function should be called.

What I mentioned in my last post was, if I would made all ships kinematic, they wont collide with each other.

2 kinematic objects will collide with each other, and the colllision listener can listen for them, but no forces will be applied, they will just pass through each other. You say you want to call a function if they collide and you don’t want to use physics, this will do just that.

1 Like

ok… I saw now that it works… sorry, but the last time I’ve tryed it didn’t

Thanks a lot

ok, now the problem is, that the ship will freze shortly if it collides with a station. Am I right by thinking this is because of beeing kinematic?

(In the CollisionListener the ship will be set back to a Position behind it)

I solved the problem. The CollisionMeshShape was to small, so it gave to much collisions at once.