# Collision between UniversalCamera and PhysicsShapeConvexHull shape

**URL:** <https://forum.babylonjs.com/t/collision-between-universalcamera-and-physicsshapeconvexhull-shape/55359>\
**Category:** Questions\
**Tags:** camera\
**Created:** [December 13, 2024, 12:57pm UTC](https://forum.babylonjs.com/t/collision-between-universalcamera-and-physicsshapeconvexhull-shape/55359 "2024-12-13T12:57:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhdbtkd](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dhdbtkd/32/37188_2.png) [@dhdbtkd](https://forum.babylonjs.com/u/dhdbtkd)\
**Post date:** [December 13, 2024, 12:57pm UTC](https://forum.babylonjs.com/t/collision-between-universalcamera-and-physicsshapeconvexhull-shape/55359/1 "2024-12-13T12:57:24Z")

</div>

I am creating a process to simplify collisions for complex meshes from imported GLTF models using `PhysicsShapeConvexHull`.

As you can see in the debugging, the `PhysicsBody` is created correctly. However, the `UniversalCamera` and the `PhysicsBody` do not collide, and the `UniversalCamera` passes through the mesh.

Is collision between a `PhysicsShape` and the `UniversalCamera` not possible?

```auto

//init camera
const camera = new BABYLON.UniversalCamera('camera', new BABYLON.Vector3(0, 7, -5), scene);
camera.speed = 0.3;
camera.applyGravity = true;
camera.checkCollisions = true;
camera.ellipsoid = new BABYLON.Vector3(1, 2, 1);

//simplyfy collision function
if (vertexCount > MAX_VERTEX_COUNT || faceCount > MAX_FACE_COUNT) {
  const convexHull = new BABYLON.PhysicsShapeConvexHull(mesh, scene);
  console.log('🚀 ~ simplifyCollisions ~ convexHull:', convexHull);
  const physicsBody = new BABYLON.PhysicsBody(mesh, BABYLON.PhysicsMotionType.STATIC, false, scene);
  physicsBody.shape = convexHull;
  physicsBody.setMassProperties({ mass: 0 });
}

```

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/f/f/ffbd60ef9ab42ea38e5942e5d61e1caeba14ce77.jpeg)

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [December 13, 2024, 1:00pm UTC](https://forum.babylonjs.com/t/collision-between-universalcamera-and-physicsshapeconvexhull-shape/55359/2 "2024-12-13T13:00:56Z")

</div>

You’ll need to create a shape and body and attach the camera to that shape transform.  
Like in this example where camera parent is the sphere.

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

---

<div class="post-metadata">

**Author:** ![dhdbtkd](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/dhdbtkd/32/37188_2.png) [@dhdbtkd](https://forum.babylonjs.com/u/dhdbtkd)\
**Post date:** [December 15, 2024, 3:14pm UTC](https://forum.babylonjs.com/t/collision-between-universalcamera-and-physicsshapeconvexhull-shape/55359/3 "2024-12-15T15:14:24Z")

</div>

Thank you Cedric. I will test your suggestion !!
