STUDIO: Can't get collision working :(

Hi there,

I have an issue that I feel should be fairly simple - in my game I have a number of balls (all with physics colliders) and a box also with a physics collider. I need to detect when the balls collide with the box. Both colliders are set to ‘event only’ - on the box I have a script called “ColliderController” and in the ADD section I have added an event listener.

add: (world, component) => {
// Runs when the component is added to the world.
function handleCollision() {
console.log(‘hello’)
}

world.events.addListener(component.eid, ecs.physics.COLLISION_START_EVENT, handleCollision)

},

No matter what combination I try - I can’t get it to work! Any help would be greatly appreciated :slight_smile:

When an entity is set to “event only,” it acts as a trigger, and triggers interacting with each other do not generate physics collision events.