Rope Editor Help

To create a rope, access the GameObject menu. Select Create Other -> Ultimate Game Tools -> Rope. A new GameObject with the Ultimate Rope component will be added to the scene

First of all, change the Rope Type parameter depending on the rope you want to create:

  • Procedural: For a fully procedural rope. The editor will also generate the mesh for you.
  • LinkedObjects: Will generate a chain using an array of a user-defined object interconnected with joints.
  • ImportBones: Will apply rope physics to a set of already existing bones. This allows to apply rope physics to externally skinned objects!

If you are creating a Procedural rope or a LinkedObjects rope, set the "Rope Start" parameter to the gameobject that will be the starting point of the rope, and the "Segment End" parameter (Rope Segment section) to the gameobject that will be the end point of the rope. If you want to create multiple segments then the last one will be the end one.

Now you can go into playmode to see the rope physics in action. Very important! Make sure that the "Length" parameter is larger than the actual separation between the gameobjects, otherwise you will see the rope go haywire.

If you are creating an ImportBones type rope then you can mail us () to provide you an example Unity project that makes use of this type of rope.

Procedural ropes

The Procedural rope will generate both the mesh and physics for you:

Rope_procedural

Parameters:

Gui_procedural

Rope Layer

Sets the rope layer. Use it to filter graphics and also for collision filtering.

Rope Physic Material

Sets the rope physic material. This will affect the friction and bounciness.

Rope Type

Switches to another rope type.

Rope Start

Controls the rope start point.

Rope Diameter

Controls the rope diameter in units.

Rope Sides

Larger values will create a rounder rope section.

Rope Material

Use it to change the rope's visual appearance.

Rope Section Material

Changes the material of the start and end caps and the cross sections of breakable ropes.

Is Extensible

Enables to elongate the rope through scripting. The rope will grow/shrink from the end.

Extensible Length

How much can the rope be elongated. Large values will need more processing power.

Has A Coil

For extensible ropes, it adds a coil so you can see where the rope winds/unwinds.

Coil Object

The "cylinder" that will act as the coil.

Coil Axis right

Coil object's axis along which the coil is going to rotate. If you look from the coil in direction to Rope Start, it needs to be the Coil Object's axis that is looking to the right.

Coil Axis Up

Coil object's axis that is pointing upwards.

Coil Width

Indicates the coil width. This limits the width along which the rope can be placed on the coil.

Coil Diameter

Controls the coil diameter. The rope will start winding with this diameter.

Coil Bone Count

Larger values will create smoother coils but will need more processing power.

Rope segments

One or more segments that the rope will consist of. The last one is always the end of the rope.

Segment End

The end of this rope segment. The last one will mark where the rope ends.

Length

The length of this segment.

Num Links

The number of links to generate to simulate the rope segment. Larger values will create smoother ropes but will need more processing power.

Collider Type

The type of collider to generate for each link. Use only if you need collisions, but it will also affect the physic behaviour.

Link Collider Skip

Creates colliders only each n links. If you have many links you may increase this value to improve performance.

Link Mass

Establishes the mass value of each link

Link Solver Iteration Count

Larger values will increase physics precision but will also need more processing power.

Link Joint Angular X Limit

How much each link can rotate up/down along the rope segment.

Link Joint Angular Y Limit

How much each link can rotate left/right along the rope segment.

Link Joint Angular Z Limit

How much each link can twist along the rope segment.

Link Joint Spring

Strength of a rubber-band pull towards the original position.

Link Joint Damper

Resistance against the spring.

Link Joint Max Force

Strength applied towards the original position.

Link Joint Break Force

Set to a different value than Infinity to make the rope breakable when a force greater than this value is applied to a link.

Link Joint Break Torque

Set to a different value than Infinity to make the rope breakable when a torque greater than this value is applied to a link.

Send Rope Events

Sends events when a rope was broken (Break Force or Break Torque have to be different than Infinity).

Events Object Receiver

The object that the events will be sent to.

Break Event Method

The name of the method from the Events Object Receiver that will be invoked using SendMessage(). Check the scripting help for more information.

Persist after playmode

This will save all parameters and rope state after exiting the play mode.

Reset Rope

Regenerates the rope in its original position. Note if one ore more control points of the rope are dynamic, all of them will return to their original position. If you want to move one or some of them and then recompute the rope with the new placement, mark them all as kinematic first and then reset the rope.

Delete Rope

Deletes the rope.

LinkedObjects ropes help

The LinkedObjects rope will generate a chain using a given object as link

Rope_linkedobjects

Parameters:

Gui_linkedobjects

Rope Layer

Sets the rope layer. Use it to filter graphics and also for collision filtering.

Rope Physic Material

Sets the rope physic material. This will affect the friction and bounciness.

Rope Type

Switches to another rope type.

Rope Start

Controls the rope start point.

Link Object

Sets the object that will be used as link in the rope chain.

Link Axis

Change it to orient the link properly.

Object Offset

Changes the distance between links. Set it to negative values to overlap and to positive values to keep distance.

Link Twist Start

Changes the twist angle of the links along its axis.

Link Twist Increment

Sets an incremental twist from one link to the next.

Rope segments

One or more segments that the rope will consist of. The last one is always the end of the rope.

Segment End

The end of this rope segment. The last one will mark where the rope ends.

Length

The length of this segment.

Num Links

The number of links to generate to simulate the rope segment. Larger values will create smoother ropes but will need more processing power.

Collider Type

The type of collider to generate for each link. Use only if you need collisions, but it will also affect the physic behaviour.

Link Collider Skip

Creates colliders only each n links. If you have many links you may increase this value to improve performance.

Link Mass

Establishes the mass value of each link

Link Solver Iteration Count

Larger values will increase physics precision but will also need more processing power.

Link Joint Angular X Limit

How much each link can rotate up/down along the rope segment.

Link Joint Angular Y Limit

How much each link can rotate left/right along the rope segment.

Link Joint Angular Z Limit

How much each link can twist along the rope segment.

Link Joint Spring

Strength of a rubber-band pull towards the original position.

Link Joint Damper

Resistance against the spring.

Link Joint Max Force

Strength applied towards the original position.

Link Joint Break Force

Set to a different value than Infinity to make the rope breakable when a force greater than this value is applied to a link.

Link Joint Break Torque

Set to a different value than Infinity to make the rope breakable when a torque greater than this value is applied to a link.

Send Rope Events

Sends events when a rope was broken (Break Force or Break Torque have to be different than Infinity).

Events Object Receiver

The object that the events will be sent to.

Break Event Method

The name of the method from the Events Object Receiver that will be invoked using SendMessage(). Check the scripting help for more information.

Persist after playmode

This will save all parameters and rope state after exiting the play mode.

Reset Rope

Regenerates the rope in its original position. Note if one ore more control points of the rope are dynamic, all of them will return to their original position.

If you want to move one or some of them and then recompute the rope with the new placement, mark them all as kinematic first and then reset the rope.

Delete Rope

Deletes the rope.

ImportBones ropes

The ImportedBones rope will apply rope physics to an already existing set of bones. This means you can create and skin meshes externally and use the rope editor to apply physics on top.

Rope_importedbones

Parameters

Gui_importedbones
The only prerequisite is all bones need to be named ending with an increasing/decreasing number.

For example:

  • Bone3, Bone4, Bone5... Bone11 or
  • Tail01, Tail02, Tail03... Tail11 or
  • Object05, Object04... Object00

The name doesn't matter, but the suffix number does. It can be increasing/decreasing and the number of characters may not be constant (1 and 11 vs 01 and 11) so it is very flexible.

In any case, if there is a naming problem the editor will output self-explanatory error messages.

Rope Layer

Sets the rope layer. Use it to filter graphics and also for collision filtering.

Rope Physic Material

Sets the rope physic material. This will affect the friction and bounciness.

Rope Type

Switches to another rope type.

First Bone

Changes the bone that will start the rope

Last Bone

Changes the bone that will end the rope

Static Bone List

Comma-separated indices of the bones that will stay still and not have rope physics. Ranges are also valid like this example: 0, 1, 3-6, 10

If a bone name is Object_113 for example, it will be referred as 113.

Ignore Collider List

Will skip collider creation for all bones in this list. The syntax is the same as the Static Bone List.

Bone Axis

The bone axis along which each bones are placed.

Bone Collider Type

The collider type that will be generated.

Bone Collider Diameter

The diameter of the rope collider.

Bone Collider Skip

Creates colliders only each n bones. If you have many bones you may increase this value to improve performance.

Bone Collider Length

Adjusts the length of the colliders.

Bone Collider Offset

Adjusts the offset of the colliders.

Link Mass

Establishes the mass value of each link

Link Solver Iteration Count

Larger values will increase physics precision but will also need more processing power.

Link Joint Angular X Limit

How much each link can rotate up/down along the rope segment.

Link Joint Angular Y Limit

How much each link can rotate left/right along the rope segment.

Link Joint Angular Z Limit

How much each link can twist along the rope segment.

Link Joint Spring

Strength of a rubber-band pull towards the original position.

Link Joint Damper

Resistance against the spring.

Link Joint Max Force

Strength applied towards the original position.

Link Joint Break Force

Set to a different value than Infinity to make the rope breakable when a force greater than this value is applied to a link.

Link Joint Break Torque

Set to a different value than Infinity to make the rope breakable when a torque greater than this value is applied to a link.

Send Rope Events

Sends events when a rope was broken (Break Force or Break Torque have to be different than Infinity).

Events Object Receiver

The object that the events will be sent to.

Break Event Method

The name of the method from the Events Object Receiver that will be invoked using SendMessage(). Check the scripting help for more information.

Persist after playmode

This will save all parameters and rope state after exiting the play mode.

Reset Rope

Regenerates the rope in its original position. Note if one ore more control points of the rope are dynamic, all of them will return to their original position.

If you want to move one or some of them and then recompute the rope with the new placement, mark them all as kinematic first and then reset the rope.

Delete Rope

Deletes the rope.

Scripting help

The following methods of UltimateRope have been created to allow scripting interaction:

void ExtendRope(UltimateRope.ERopeExtensionMode eRopeExtensionMode, float fIncrement)

Extends the rope. The rope needs to have its Is Extensible parameter checked in order to work.

if eRopeExtensionMode is set to UltimateRope.LinearExtensionIncrement, fIncrement will be given in units (positive to elongate, negative to reduce).

if eRopeExtensionMode is set to UltimateRope..CoilRotationIncrement, fIncrement will be given in degrees (positive to elongate and negative to reduce). To use the CoilRotationIncrement mode, the rope besides having the Is Extension checked will also need to have the Has A Coil value set.

To check at any given moment the amount of extended coil, you may check the UltimateRope.m_fCurrentExtension variable. This value will be always between 0 and UltimateRope.ExtensibleLength.

Values that put the rope extension outside the valid range will be clamped.

void BeforeImportedBonesObjectRespawn()

Must be called on the ImportedBones type rope right before you are going to move an object that has a skin affected by it. Otherwise the bones may not move along with it.

This is only needed when you are respawning it to another place. After respawning the object call AfterImportedBonesObjectRespawn().

void AfterImportedBonesObjectRespawn()

Must be called right after you respawned an object that has a rope of type ImportedBones attached. This de-parents the free bones again.

Rope Events:

When a rope breaks and the Send Rope Events parameter has been checked, a message will be sent to the receiver object. A method like this needs to be created:

void OnRopeBreak(UltimateRope.RopeBreakEventInfo breakInfo) {
   // Do stuff here
}

The RopeBreakEventInfo has the following members:

rope (UltimateRope)

The rope that was broken

link1 (GameObject)

The link that was broken on one side (this is the one always closer to the rope start).

link2 (GameObject)

The link that was broken on the other side (this is the one always closer to the rope end).

worldPos (Vector3)

The break position in world coordinates.

localLink1Pos (Vector3)

The break position in link1's local coordinates.

localLink2Pos (Vector3)

The break position in link2's local coordinates.