Obi Rope setup

Obi Rope Component

Any object can be used to generate a rope by adding an Obi Rope component.

  • Go to Component->Physics->Obi->Obi Rope, or
  • click the "Add Component" button in the inspector of any object, then searching for "Obi Rope".

This is how ObiRope's inspector window looks like:

You will see additional constraint components added apart from this one.

Rope aditional components

Rope Path (Spline)

We need to add a rope path to define the shape of the rope. In order to generate a particle-based representation of a rope, ObiRope will need information about the initial shape and length of the rope. This information can be provided using the ObiCurve component. You can read more about it here.

Just add this component to any object in the scene (the rope object itself is an usual choice) and then feed it to the "Rope Path" property of your Obi Rope Component.

Once you click "Initialize", the spline will be used to generate a particle-based representation of it.

Obi Rope Section

To be able to initialize the rope, you will also need to provide a rope section asset (listed as "section" in the renderer inspector). This is the shape that will get extruded along the curve path to generate the rope mesh. The default included one (DefaultRopeSection) will do fine most of the time. You can create your own section assets by right clicking in any project folder, and selecting "Create->Obi->ObiRopeSection" from the context menu.

Obi Solver Component

If we hit play after initializing the rope, nothing will happen. This is because ObiRope only creates particles and sets up constraints between them, but does not perform any simulation by itself. That is the job of the ObiSolver component.

This component can be attached to any GameObject in your scene, so go ahead and add it to any existing object or create an empty GameObject for it. Then feed it to the Obi Rope Component "solver" attribute.

Now hit play, and watch the simulation take place.

You can hit "Edit Particles" to enter the particle editing mode exactly in the same way as you can with any other Obi actors.

Constraint Components

The constraint groups used for an ObiRope are (in no particular order):

Each constraint component holds all properties and parameters specific to that constraint type.

Summary

Keep in mind the steps to set up rope:

  • Add the Obi Rope component to your rope object.
  • Add a Obi Solver component to any GameObject in your scene.
  • Add a curve path (ObiBezier or ObiCatmullRom) component to any object in your scene.
  • Feed both the path and the solver to your rope, and click "Initialize".