Hi everyone, what would be the simplest way to implement convex collision for a model? I was using a simpler model before so using boxes and spheres were enough but now I want to use a more complex scene (not flat ground, many objects obstructing road around etc.). What would be the simplest way (if there is any) to implement collision to this:
What do you mean by simplest?
Also: it isn’t only the complexity of the scene to keep in mind when choosing collision shapes.
As far as I understand, convex hulls are far more expensive if it comes to performance as they involve a lot more computation for collision detection. Simple shapes are way faster. Of the primitives available in Defold, spheres are fastest, just a radius check, then the capsules, boxes next.
For an architectural scene like yours - ideal for primitive shapes. Maybe convex hulls here and there for the street furniture, but only if necessary.
Would simple rotated rectangles not work? Instead of using convex shapes.
I tried with decomposition and assigning convex shapes to multiple collision objects but its such a pain… and still didn’t work, I just fall though them randomly. Even if it worked for a complex object you have to manage 100s of collision objects, their group and mask, mass, type, etc..
Of course you can still try but otherwise upvote Implement concave triangle physics shapes and .concaveshape format · Issue #9267 · defold/defold · GitHub ![]()
