How to deal with collision in different types of topology [3D environment]

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Alex Pires

Hi guys!

How to deal with collision in different types of topology in a 3D environment? I mean, in a irregular topology, I can’t assign a plane or a cube, it’s a mesh with a complex shape.

View image on imgur.com
May someone explain or point a tutorial about this subject?

Thank you in advance and sorry about my english.

:bust_in_silhouette: Reply From: SIsilicon

The answer’s pretty simple. Use a trimesh static body instead. There’s a useful little menu button you can use to create such a collision shape from a MeshInstance.

enter image description here
Be warned however. If the mesh is composed of a lot of triangles, it can cause a performance hit. So either make a trimesh out of a lower poly version, or create a convex version instead. Performance wise it costs less but you’d sacrifice accuracy.

Thank you very much.

Alex Pires | 2019-02-22 02:34