How would you inform the program that there is a collision

Hy you all,

if i move 2 cube to each other (with physics or not) how can i alert when they touch ?

sorry for the question , after playing again with TestCollisionListener i have my answer !

Well, without a physics-engine that does it for you, you have to wrap BoundingVolumes (here BoundingBoxes since you are talking about cubes) around the cubes and check every frame (or how accurate you want to be) if these BoundingVolumes interecept with BoundingVolume.intercepts(BoundingVolume bv). That’s all there is to do.

I hope that helped :slight_smile:

Edit: Opps you were faster than me :wink: