Collision detection without physics - best practises

In my game I just need to check if the objects are overlapping or not. I’ve spent some time learning physics engine and collision, but feel like they’ve giving the functionality and complexity I don’t really need. Actually, I want some sort of a 3d tile map.

Hi

Unless your shapes are trivial like spheres or axis aligned boxes or can be easily bound by such shapes then you probably need to use collision shapes:

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:physics

Trivial cases:

http://hub.jmonkeyengine.org/javadoc/com/jme3/bounding/BoundingSphere.html

http://hub.jmonkeyengine.org/javadoc/com/jme3/bounding/BoundingBox.html

Br,
Tommi

Hey, thanks for answering :slight_smile:

My shapes are pretty trivial - a box or a combination of a few of them. Is there other way? Like to ask root node if there’s a geometry located in (x,y,z)

Check the “Hello Picking” tutorial.

Think I don’t like about collideWith function is it returns collision with the same object but a different triangle mesh multiple times. But I can deal with it