in C++ by (13.3k points)
0 like 0 dislike

For some reason, using a triangle mesh causes my object to fall through terrain in Urho3D. Convex hull has collisions and works great, and I will use it if I have to, but it would be nicer to have mesh-based collisions for impacts and the like. Any idea why this happens in Urho3D game engine?

The scene is very simple: floor and box. Both has component CollisionShape with value TriangleMesh. And if I change type collider for one of them to other it’s work fine, but not TriangleMesh with TriangleMesh.

Collision not working, box falling through terrain. Is this a problem or standard behavior of physics in Urho3D?

  • no collisions on triangle mesh in urho3d
  • triangle mesh falling through terrain in urho3d
  • urho3d triangle mesh don't collide
  • urho3d collision not working on triangle mesh collider

1 Answer

0 like 0 dislike
by (13.3k points)

In Urho3D game engine for physics simulation used physics engine Bullet Physics Library. All deal in him. Triangle mesh from Bullet can be only static, it won’t work properly on dynamics objects, i.e. if ther mass is other than zero. Use convex hull instead. You must use trianglemesh only for static objects, because it meant for only objects that don’t move.

Bullet expects triangle meshes to remain stationary. You could combine several convex hulls/shapes instead, if you really need extra detail.

Do you try to use your ‘highdetail’ mesh as input? That may be the cause for being ‘offballanced’. You can use a simplified mesh for collision on an animated model. For this you need to create a special, more simple mesh for being used as convex collision model and the one you already have will only be used for rendering.

Your answer

Try to answer the question as detailed as possible.
Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.