Collision box generator for given frame

Hi Community,

At first: I did read a lot about this topic in the last days, but I couldn’t find a good solution for the problem I am about to solve:

The world: It’s a space environment with space ship models. No physics added.

Now I want to add collision detection for some complex space ship models. I can realize the detection with shapes like boxes and spheres, but not with those complex models.

One solution would be to create colliding boxes and spheres which somehow fit to the model, but it’s very time consuming for shapes like a star destroye :slight_smile: .

Is there maybe somewhere a colliding box generator for threejs or js in general? As parameter you would give points of the shape and the generator would create boxes which fits in that shape.

There is only the API in context of THREE.Box3 (which is essentially an AABB) and for THREE.Sphere (a bounding sphere). There is no functionality that allows you to automatically generate a hierarchy of best-fit bounding boxes. That would assume you have an implementation of an oriented bounding box (OBB) which is far more complex than an AABB.