# HavokPlugin setCollisionCallbackEnabled failed

**URL:** <https://forum.babylonjs.com/t/havokplugin-setcollisioncallbackenabled-failed/42893>\
**Category:** Questions\
**Tags:** havok\
**Created:** [August 1, 2023, 9:43am UTC](https://forum.babylonjs.com/t/havokplugin-setcollisioncallbackenabled-failed/42893 "2023-08-01T09:43:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bateer\_li](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bateer_li/32/34002_2.png) [@bateer\_li](https://forum.babylonjs.com/u/bateer_li)\
**Post date:** [August 1, 2023, 9:43am UTC](https://forum.babylonjs.com/t/havokplugin-setcollisioncallbackenabled-failed/42893/1 "2023-08-01T09:43:30Z")

</div>

I have 2 balls and a floor. I don’t want to get the collision callback of the ball and the floor. I write the code like this, but I still get the callback. Are these two mutually exclusive?

```auto
const sphere = new PhysicsAggregate(instance, BABYLON.PhysicsShapeType.BOX, baseImpostorParams, scene);
sphere.body.setCollisionCallbackEnabled(true);
sphere.body.setEventMask(hk._hknp.EventType.COLLISION_STARTED.value)

const ground = new PhysicsAggregate(instance, BABYLON.PhysicsShapeType.BOX, baseImpostorParams, scene);
ground.body.setCollisionCallbackEnabled(false)

const observable = hk.onCollisionObservable
const observer = observable.add((collisionEvent) => {
  console.log(collisionEvent.collidedAgainst.transformNode.name,collisionEvent.collider.transformNode.name,)
      })

```

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [August 1, 2023, 1:04pm UTC](https://forum.babylonjs.com/t/havokplugin-setcollisioncallbackenabled-failed/42893/2 "2023-08-01T13:04:00Z")

</div>

Hello and welcome to the community!  
If you enable the callback for one body, there’s going to be collision events for anything involving it, no matter the status of the other body.

---

<div class="post-metadata">

**Author:** ![bateer\_li](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bateer_li/32/34002_2.png) [@bateer\_li](https://forum.babylonjs.com/u/bateer_li)\
**Post date:** [August 1, 2023, 1:11pm UTC](https://forum.babylonjs.com/t/havokplugin-setcollisioncallbackenabled-failed/42893/3 "2023-08-01T13:11:44Z")

</div>

OK, but I read on the official website “world-wide callback” is more performant than “body-specific callback”,Dealing with useless colliders is not so elegant，If I have hundreds or thousands of colliders
