Any references or examples on creating physics object in the shape of geometry of 3D object? I want to hold 2 of my objects together (each having a hook) with the help of a torus. However, I tried with few physics shapes but I am unable to achieve this and the objects are not holding up together.
What physics library are you using?
Use ammo.wasm.js is most cheap ang lagless because using c++ via wasm.
https://enable3d.io/examples/types-of-constraints.html
https://enable3d.io/examples/wrecking-ball-with-metal-chain.html
I have not used one yet. I have been looking at ammo and looking for an example relevant to my use-case.
Projects like three-to-ammo and three-to-cannon can help with converting three.js objects to the representations your physics engine needs.
Note that you don’t necessarily want the physics shape to be exact – if you can simulate more complex objects as a collection of simple shapes like boxes and cylinders, the physics simulation will generally perform much better.
2 Likes