diff options
author | David Vogel <Dadido3> | 2020-07-30 19:35:34 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2020-07-30 19:53:35 +0300 |
commit | 820ca419e098f1ac90b499180a3206dd44692ba8 (patch) | |
tree | a2b7288ca2a8a9124b4977ae0a03cadd41282ecd /source/blender/makesrna/intern/rna_rigidbody.c | |
parent | d3944940f9862386cfad692b9d338b670584908c (diff) |
Add compound shape for rigid body simulation
This patch adds a new compound shape entry to the shape selection
dropdown. It also corrects wrong inertia calculation for convex hulls,
that resulted in strange behavior for small objects.
The compound shape take the collision shapes from its object children
and combines them. This makes it possible to create concave shapes from
primitive shapes. Using this instead of the mesh collision shape is
often many times faster.
Reviewed By: Sergey, Sebastian Parborg
Differential Revision: http://developer.blender.org/D5797
Diffstat (limited to 'source/blender/makesrna/intern/rna_rigidbody.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_rigidbody.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_rigidbody.c b/source/blender/makesrna/intern/rna_rigidbody.c index 325c4e3caa9..450d148d8a3 100644 --- a/source/blender/makesrna/intern/rna_rigidbody.c +++ b/source/blender/makesrna/intern/rna_rigidbody.c @@ -75,6 +75,11 @@ const EnumPropertyItem rna_enum_rigidbody_object_shape_items[] = { "Mesh", "Mesh consisting of triangles only, allowing for more detailed interactions than convex " "hulls"}, + {RB_SHAPE_COMPOUND, + "COMPOUND", + ICON_MESH_DATA, + "Compound Parent", + "Combines all of its direct rigid body children into one rigid object."}, {0, NULL, 0, NULL, NULL}, }; |