# Help debug why PhysicsAggregate with BABYLON.PhysicsShapeType.MESH isn't initiated Nextjs

**URL:** <https://forum.babylonjs.com/t/help-debug-why-physicsaggregate-with-babylon-physicsshapetype-mesh-isnt-initiated-nextjs/54809>\
**Category:** Questions\
**Created:** [November 17, 2024, 5:40am UTC](https://forum.babylonjs.com/t/help-debug-why-physicsaggregate-with-babylon-physicsshapetype-mesh-isnt-initiated-nextjs/54809 "2024-11-17T05:40:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![immunity](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/immunity/32/40353_2.png) [@immunity](https://forum.babylonjs.com/u/immunity)\
**Post date:** [November 17, 2024, 5:40am UTC](https://forum.babylonjs.com/t/help-debug-why-physicsaggregate-with-babylon-physicsshapetype-mesh-isnt-initiated-nextjs/54809/1 "2024-11-17T05:40:57Z")

</div>

Hello, I have a project in Next.js with HavokPlugin where there is a ground/platform and on top of it there are some spheres that move.

For Cylinder, Box platform (CreateCylinder, CreateBox) everything works fine sphere’s physicsBody and ground physicsBody are generated (through PhysicsAggregate) and the spheres don’t pass through ground but stay on top of it. (I can see PhysicsBody by enabling Viewer ShowBody

But if I try to create a Mesh and create a PhysicsBody of MESH type for ground/platform spheres pass through the ground and I can’t see the “body” of ground using Viewer.showBody(ground.body). Same when I CreateCylinder for ground if on PhysicsAggregate function I add BABYLON.PhysicsShapeType.Cylinder works fine and I can see PhysicsBody but if I use BABYLON.PhysicsShapeType.MESH it doesn’t work PhysicsBody for ground isn’t initiated/added

In Playground it works as expected

> **[Babylon.js Playground](https://playground.babylonjs.com/#4EMFJE)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL and WebGPU 3D scenes

On nextJS project I have to add Havok like this

```
  import HavokPhysics from "@babylonjs/havok";
  import { HavokPlugin } from "@babylonjs/core/Physics/v2/Plugins/havokPlugin";
  // ...
  // initialize plugin
  const havokInstance = await HavokPhysics();
  // pass the engine to the plugin
  const hk = new HavokPlugin(true, havokInstance);
  scene.enablePhysics(new Vector3(0, -gravity, 0), hk);

```

Any help on how to debug this 😕

Thanks in advance

---

<div class="post-metadata">

**Author:** ![immunity](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/immunity/32/40353_2.png) [@immunity](https://forum.babylonjs.com/u/immunity)\
**Post date:** [November 17, 2024, 9:00pm UTC](https://forum.babylonjs.com/t/help-debug-why-physicsaggregate-with-babylon-physicsshapetype-mesh-isnt-initiated-nextjs/54809/2 "2024-11-17T21:00:21Z")

</div>

Apparentely the problem was That I was using both BABYLON object ( from “babylonjs” ^7.13.1) library and Objects like MeshBuilder from “@babylonjs/core” ^7.13.1 library.
