- Add
Simulation Template
in project hierarchy (right click thenPBD2D/Simulation Template
).
- Add entity
TriMesh
in project hierarchy (right click thenPBD2D/TriMesh
).
- Connect entity with the
World
fromSimulation Template
.
- Create serialized data in project assets.
- Configure serialized data: select texture for triangulation, and hit "Triangulate" button.
- Select created serialized data in created entity. Note: turn on the gizmos to see the
TriMesh
preview. One can return to point 5. and play with the triangulation settings to produce different meshes.
- Attach components required for your setup. Minimal setup for simulated softbody, collidable with ground and other
TriMesh
can be found below.
- To control the behavior of the body, i.e. friction or collisions, create
Physical Material
in project assets and attach it the selected entity.