Quite often you´ll want to "glue" part of a ObiActor (rope, cloth or softbody) to another object. This can be easily achieved by using an attachment.
To create an attachment, select the actor you want to attach and look for ObiParticleAttachment in the Add Component menu. All attachments take two inputs:
Transform we want to attach the actor to.
The particle group you want to keep attached to the target. For cloth and softbodies, you can define new particle groups in the blueprint editor. Ropes and rods automatically generate a new group for each path control point.
Particles affected by more than one attachment will follow the attachment that was updated last. The update order for attachment is undefined.
There's two types of attachment, that behave very differently: static and dynamic.
Static attachments entirely deactivate dynamics for the particles in the group, and drive them using the target transform instead. This is very inexpensive and ensures perfect attachments that do not drift or separate.
However, since no dynamics are involved in a static attachment -no forces, velocities or accelerations-, statically attaching an actor to a rigidbody will cause the actor to blindy follow the rigidbody's transform. The rigidbody will behave exactly in the same way it would if no actor was attached to it.
By using dynamic attachments, you allow the particles to be fully simulated and exchange impulses with rigidbodies. This means the actor will be affected by the rigidbody's movements, and the rigidbody will in turn
be affected by the actor.
Internally, dynamic attachments use pin constraints. Read the pin constraints section for more info on pin constraints.
Dynamic attachments have a couple of extra parameters:
Constraint compliance in meters/Newton. A value of zero will strive to make the attachment as rigid as possible, given the current simulation budget (timestep size and pin constraint iteration count). High values will make the attachment more flexible.
Maximum force (in Newtons) that the attachment can resist without breaking.
When using dynamic attachments, try make sure the mass ratio between the particles and the attached rigidbody is reasonably small. Don't pin 1 gram particles to a 100 kg rigidbody, the result will be unstable and cause stutter and jittering motions unless your timestep size is very small.
You can use dynamic attachments to suspend rigidbodies from a rope or piece of cloth or rope. You can use this to create lamps, cranes, etc.
Some actors such as ObiRod or ObiSoftbody make use of oriented particles. In this case dynamic attachments will let you constraint both particle positions and orientations.