- Home /
Compound colliders on triangle shapes
I have shapes in my game that needs compound colliders. Its not a problem creating colliders for the most basic shapes but if the shape is a form of a triangle I cant really create a coliider that will match the shape becuase there is no triangle primitive collider. The only thing thats close is the box collider but I need my triangel angle to be 90 degrees for it to fit and usually thats not the case in my tiangles.
Please help if you can, Ive allready spent countless hours trying to fix this problem with no success.
If I use a mesh collider then they cant collide with each other/
Use a mesh collider, tick the 'convex' toggle. This will allow them to collide with each other, and for simple platonic solids like the ones you are describing it will not reduce the accuracy of the collider at all.
But if I use convex it closes all open spaces so the shapes cant realisticly collide with each other.
(adding as a comment since I can't plus yet due to low rep)
Answer by whydoidoit · Jun 16, 2012 at 09:53 AM
So I'm not quite sure what you are doing, but if you were previously able to use primitives you just need to make yourself a kind of convex triangle primitive.
Make a triangular prism mesh
Create a mesh collider
select your triangular mesh
set it to convex
scale and position it correctly
repeat :)
Answer by hd27 · Jun 17, 2012 at 01:26 PM
Thank you! Thats exactly what I needed to solve my problem, works great!
Hi - please using the "Add New Comment" button hidden on the right of the screen when you are making a comment not writing a "Solution" :)
Could you mark my answer as correct to get it off the list of unsolved questions?