Problems colliding models exported from SketchUp

Hello, I’m new here, but I’ve read a lot and learned a lot, thanks to all the knowledge shared above, so thank you too, now to what I’m talking about, I have problems when making simple collisions (AABB and OBB) with models exported from SketchUp, This does not happen with all models, some collide correctly and others do not, and I have tried to export them in different formats and using the same characteristics when exporting, in the screenshots I show both situations, one model colliding correctly

Screenshot_20240217_045507

and another that does so. even without making contact
Screenshot_20240217_045354

and it happens on other occasions that I can even overlap the models and it never counts as a collision, saying that this happens in different models in each of the situations.

Hard to say without seeing how you calculate the collision boxes tho

Oh, I apologize if I didn’t explain myself well, I use Box3().setFromObject() method for AABB and then obb.fromBox3() for obb, then I check the collision with box.containsBox(box2) for AABB and obb.intersectsOBB(obb2) for OBB. I’ve also checked with BoxHelper(), and the bounding box is drawn tight to the model as much as possible, containing all its meshes inside

Here I leave a folder with some models in case you want to review them and it is possible to find a difference, I am not very good at Blender, I separate them by correct and incorrect, the correct ones collide, the incorrect ones nope, thanks in advance.

I have also noticed that in the models that have problems when colliding, if I move them far enough away at a certain point they stop colliding, it is as if the box were huge, but when I check them with BoxHelper they are not, they fit perfectly in width, I leave some screenshots
En
Screenshot_20240220_064138

In the first capture, still distant but colliding, in the second it does not do so, it is as if it were outside the collision range.

Screenshot_20240220_064103

Yes, but since the bug is with the code - you’d need to share part of the code responsible for (1) calculating collision boxes, (2) checking the collisions.

It’d be helpful if you could create a codepen or codesandbox that replicates the issue - the collisions themselves are quite trivial overlap checks, so I imagine the issue lies in either (1) how you calculate bounding boxes or (2) which bounding boxes you’re using for collisions.

Hello, thanks for the instructions, I leave you a live section with the code in sandbox, some things will seem a little strange because I use vue to manage the interface, although now the buttons and other functions are not necessary, I eliminated them and left only the essentials

Live Session