3D environment collisions: tips, best practices?

Hello everyone!
So I’m not asking about how collisons work, I’m looking for some advice / resources on how to properly do environment collisions (especially building interiors), or how they’re usually done in games I guess.

The Godot docs say primitive shapes are best, concave shapes are worst (computationally expensive), but one concave shape can be better than many primitive ones… okay, but not very specific.

Below you can kind of see what I have right now, for two rooms I pieced together the interior collisions from 23 primitive box shapes...

I have no idea if this is how it’s supposed to be.. I kind of doubt other games do it like this, but if this supposed to perform best then I’ll keep doing this way, it’s fairly easy to import these shapes from Blender and turn them into box collisions.

Anyone has any advice? How else would you do it?

2 Likes

Unfortunately don’t know, but if you’re not running into performance issues then it’s probably not worth worrying too much about it for now. Only thing I could think of is having a big collision box for the entire room, and seeing if the player is in the room and only then enabling all the collisions within that room.

(Btw thanks a lot for posting the solution to your post “Editor freeze for a second after using alt+tab” I was tearing my hair out over it haha)

1 Like