How would i add collisions to a custom 3d model of a room?

I’m currently making a first-person game in three.js and I am creating the environments in blender and exporting them as .glb models. I was wondering if there is a lilbrary or feature that would add colliders to the rooms so that players cannot go through walls and can go up and down ramps and such.

Some of the gemotery can be a tad too complex for simply creating several box shaped colliders, so Ideally I wouldn’t want to resort to that. I’m also aware of physics libraries like cannon.js and ammo.js and im wondering if any of those would help with that kind of collision detection.

Any leads?

I have a feeling this may just as well apply here (esp. the second point) :grin:

1 Like