Trying to simply detect collisions between two models

Struggling to simply detect for a collision between two objects. I followed the tutorial example as best I could.

The first model is a static box in the scene.

The second model is a box which has it’s position updated by a HTC vive controller.

I put collision boxes and rigid bodies on both.

If the HTC vive rigid body is static there are no collisions.

If the HTC vive rigid body is dynamic it keeps dropping to the floor with gravity. (i am using rigidbody.synctobody)

Is there anyway for me to do collisions without having to use the physics engine?

my example is

ok setting it to Kinematic seems to sort the issue but i would like to know if it’s possible to do collisions easier than this, say just with collision volumes and not rigid bodies?

If you do not need physics simulation for an entity, then you can only use collision component and not rigidbody, and use trigger system.

i tried using just trigger volumes and it didn’t work

here is my example

pressing the left arrow moves one box towards another, collisions cause output to the console.

the “triggerenter” event only ever fires if I add a rigid body to the box that moves.

Then making that box as kinematic - shall suit your needs :slight_smile:

I thought you said I could do it without physics. Surely to set to Kinematic then i need to add a rigid body then I am back to physics again am i not?

If you want to avoid using physics, then you shall make own detection, perhaps using some maths or aabb’s.
If you want to use integrated system, then kinematic shall be suitable. It wont be “pushed” and ignores gravity.

1 Like