What is the best/correct way of doing this? I have added box colliders to my object but the object has a triangle shape at the top part. I have added a box collider on it but this is not realistic as objects would bounce of an invisible part.
You place them by hand as multiple child objects.
For this sort of object the arrangement will be like this.



Or, if it is a static object, you could use a mesh collider instead.
thank you. So if I use a mesh collider I don’t have to put it to Convex right? becouse then the door way is also blocked by the collider.
I suggest trying the multiple box colliders method that neginfinity showed in the images. It is likely to work faster.
I think I’d go with 2 box colliders for the bottom part and 1 convex mesh collider for the top triangle.
Primitives (box colliders) are faster than Convex Mesh Collider.
Convex Mesh Colliders are faster than Non-Convex Mesh Colliders.
Only Convex mesh colliders can collide with other mesh colliders.
Convex mesh colliders are limited to 255 triangles per collider.
So constructing collider out of boxes like I suggested will result in best performance.
And if you expect this building piece to ever fall down using physics, you’ll have to build it out of boxes.
