Incorrect bounding box, collada model

Description of the problem

In the latest version (r92) the stormtrooper collada model has an incorrect boundingBox.
I tried the BoxHelper:

const box = new THREE.BoxHelper(object, 0xff0000);

or a manual approach:

const boundingBox = new THREE.Box3().setFromObject(trooper);
const size = boundingBox.getSize();
const center = boundingBox.getCenter();
const geometry = new THREE.BoxGeometry(size.x, size.y, size.z);
const material = new THREE.MeshBasicMaterial({ wireframe: true, color: 0x0000ff });
const box2 = new THREE.Mesh(geometry, material);
box2.position.set(center.x, center.y, center.z);

Both approaches result in the model not being in the boundingbox:
screen shot 2018-05-04 at 10 31 38

I already figured out that this started with r87,
r86 didn’t have this issue:
screen shot 2018-05-04 at 10 31 25

example code:
r86: r86...stijndeschuymer:bounding-box-test
r87: r87...stijndeschuymer:bounding-box-test-r87

I’m currently trying to figure out what causes this, but I’m quite new to three.js,
so I’d highly appreciate it if someone pointed me in the right direction!

Three.js version
  • r92
  • r87
  • r86

Author: Fantashit

1 thought on “Incorrect bounding box, collada model

Comments are closed.