Quick Start Guide
This guide will walk you through setting up a basic interactive physics rope in your scene in under a minute.
1. Creating a Rope
Step 1: Create the Container GameObject
Create an empty GameObject in your scene to act as the rope container:
- In the Unity Hierarchy, right-click and choose Create Empty.
- Rename the GameObject to
MyRope.
Step 2: Add the Physics Controller
With MyRope selected in the Hierarchy:
- In the Inspector, click Add Component.
- Search for and select
Rope Controller.
The RopeController component manages the internal XPBD physics simulation, particle arrays, and constraints.
Step 3: Add a Visual Renderer
The rope needs a renderer component to be visible in the camera view. Choose one of two rendering styles:
- Option A: Continuous Tube (
Rope Renderer)- Generates a procedural smooth 3D mesh along the physics particles.
- Assign a standard Unity material (e.g.
Default-Materialor one of the materials inTensio/Demos/Materials).
- Option B: Rigid Chain Links (
Rope Chain Renderer)- Renders individual chain links via GPU instanced batching.
- Assign a
Link Mesh(e.g., chain link FBX) and an instancing-enabledMaterial.
Step 4: Configure Initial Parameters
Under the Init Settings foldout in Rope Controller:
- Length: Set to
10(meters). - Particle Count: Set to
20(higher counts create heavier, smoother curves).
Step 5: Enter Play Mode
Click the Play button in Unity. You will see your rope spawn, drape under realistic gravitational acceleration, and settle smoothly!
2. Pinning the Rope to Anchors
Anchoring ropes to static environmental points or moving Rigidbodies requires just a couple of clicks:
- Select your
MyRopeGameObject in the Hierarchy. - In the Scene View, click any control point along the curve (for example, the top point).
- In the floating Point Editor window, check the “Pinned” toggle.
- Drag and drop the target GameObject you wish to attach to into the Target field, or click the Eye Dropper tool and select the object directly in the 3D scene view.
- Press Play. The top anchor point will remain pinned while the rest of the cable swings dynamically like a pendulum!
Next Steps
- Learn about all simulation parameters in the Rope Controller Deep Dive.
- Configure procedural tube meshes in Rope Renderer.
- Set up GPU-instanced chain links in Rope Chain Renderer.