Skip to content


 Zabbix
 Grafana
 Prometheus
 React Three Fiber
 Threejs and TypeScript
 SocketIO and TypeScript
 Blender Topological Earth
 Sweet Home 3D
 Design Patterns Python
 Design Patterns TypeScript
   
 Course Coupon Codes
Three.js and TypeScript
Kindle Edition
$6.99 $9.99 Paperback 
$22.99 $29.99




Design Patterns in TypeScript
Kindle Edition
$6.99 $9.99 Paperback
$11.99 $19.99




Design Patterns in Python
Kindle Edition
$6.99 $9.99 Paperback
$11.99 $19.99




Compound Shapes

Working Example

Description

You can simulate more sophisticated cannon body shapes by utilizing the useCompoundBody hook to create a compound shape.

A compound shape is a collection of shapes. If you need a shape that is more complicated than a sphere, box or cylinder, then you will get much better performance by creating a compound shape of spheres, rather than using a trimesh, convexPolyhedron or a compound shape of other shapes.

Change the visibility of the Debug Renderer in the working example above to visualize the compound shapes used. Walk around the scene and see the effect when you collide the character with the spinning objects.

Trimeshes, ConvexPolyhedrons and Compound Shapes sbcode.net