Attaching Rope, Cloth or Softbodies

Quite often you´ll want to "glue" part of a ObiActor (rope, cloth or softbody) to another object. In Obi there are at least three different ways to approach this:

Fixing particles
Fixing particles freezes them in place. They will ignore all physics and just be translated/rotated/scaled by the actor's transform.
Handles
A handle fixes a group of particles in place, but instead of transforming them using the actor's transform, it uses the handle's transform.
Pin constraints
Pin constraints allow for two-way coupling between rigidbodies and Obi actors. For instance, you can hang a rigidbody from a rope. Both the rope and the cube will react realistically to each other.

We'll now take a deeper look at each of the three options.

Fixing particles

To fix particles, you need to enter edit mode. (See the editing particles section for more info). To do so, go to your ObiActor inspector and click the Edit particles edit particles button:

Once in edit mode, you can use any of the selection tools to select the particle(s) that you want to fix. When you're done, click the Fixfix button and the particles will turn red. This means they will now ignore physics and blindly follow the GameObject's transform. If you translate, rotate or scale the object, fixed particles will be affected by the transform. All other particles will remain attached to the fixed particle(s) and will behave naturally.

Handles

You need to enter edit mode to create a handle. To do so, go to your ObiCloth or ObiRope inspector and click the Edit particles edit particles button:

Once in edit mode, you can use any of the selection tools to select the particle(s) that you want to be part of a handle. When you're done, click the Handlehandle button and a new GameObject (aptly named ObiHandle) will appear in your scene hierarchy. The particles affected by the handle will ignore physics and blindy follow the handle's transform. This is achieved by fixing the particles (setting their inverse masses and velocities to zero), then setting their positions/orientations directly. If you translate, rotate or scale the handle, these particles will be afected by the transform.

Pin constraints

By applying a pin constraint to a particle, you allow it to interchange impulses with a regular rigidbody. This means the particle will be affected by the rigidbody's movements, and the rigidbody will in turn be affected by the particle. This cannot be achieved by fixing particles or using handles, as the rigidbody would completely ignore the particles.

Read the pin constraints section for more info on pin constraints.