A simple tool to make rigidbodies swarm a mesh in Unity.
Works on Mesh Filters and Skinned Mesh Renderers.
- Add the
PiranhaTargetcomponent to a game object with a Mesh Filter or Skinned Mesh Renderer.
- Drag any rigidbodies you want to swarm the target into the
- Hit play!
Forceto change how attracted the rigidbodies are to the target.
- Change the
Distanceto prevent rigidbodies from swarming the target unless they are within the