mrdoob/three.js — Issue #725: using MeshColliderWBox() on Colladas
Author: powerslave
Created: 2011-11-04 20:28:59+00:00
State: open

I am trying to add a Collada model as a collider box using THREE.CollisionUtils.MeshColliderWBox()

I've been trying to create a new mesh from the collada model to use as a collider box

```javascript
zmesh = new THREE.Mesh( collada.scene, new THREE.MeshNormalMaterial() );
```
as well as putting the model directly as a collider box

```javascript
THREE.CollisionUtils.MeshColliderWBox(collada.scene);
```

both ways fail. From the error I assume due to the fact that collada.scene does not have a geometry property.

After looking for the geometry property, I used

```javascript
THREE.CollisionUtils.MeshColliderWBox(geometry.scene.children[0].children[0]);
```
as a quick test, which works as expected.

So I assume I could now loop over all the children and add collider boxes, however I'd rather have one collider box only per dae. Ideally, I'd like to add the whole collada.scene as collider box.

Can someone advise how that can be achieved in an elegant way?