Skip to content

Interaction Tools (Winch & Cutter)

Tensio includes production-ready interaction components allowing players or gameplay systems to manipulate ropes dynamically in real time.


1. Rope Winch

The RopeWinch component dynamically spools rope out or reels it in, accurately mimicking hoists, crane cables, elevator lifts, and motorized winches.

Parameters

ParameterTypeDefaultDescription
Winch Speedfloat2.0Retraction/extension speed in meters per second.
Min Lengthfloat0.5Minimum limit preventing negative lengths or solver compression crashes.
Max Lengthfloat50.0Maximum limit for total deployed cable.
Extend KeyKeyCodeDownArrowTest hotkey for feeding cable out.
Retract KeyKeyCodeUpArrowTest hotkey for reeling cable in.

Visual Synchronization

Instead of unnaturally stretching or compressing geometry, RopeWinch automatically scrolls the UV Offset (for tube meshes) or Link Offset (for chain links). This produces an authentic visual illusion of cable feeding continuously into or out of a reel mechanism.


2. Rope Cutter

The RopeCutter utility enables players to slice ropes dynamically during gameplay using mouse rays, laser cutters, or melee weapon sweeps.

Usage

  1. Attach RopeCutter to your player camera or an input manager GameObject.
  2. (Optional) Assign a Unity LineRenderer to render a cutting slash visual trail.

Parameters

ParameterTypeDefaultDescription
Mouse Buttonint0Mouse button index to initiate cut (0 = Left Click, 1 = Right Click).
Max Distancefloat100.0Maximum camera raycast distance for targeting ropes.
Min Cut Intervalfloat0.15Cooldown period between cuts in seconds to prevent spamming.
Trail SettingsTrailConfigControls the width, color gradient, and fade duration of the cursor slash.

How Slicing Works Internally

When a cut ray intersects a rope segment:

  1. RopeCutter calls ropeController.Split(segmentIndex, segmentFraction).
  2. The original rope shrinks to retain particles before the cut point.
  3. A brand new RopeController GameObject is instantiated on the fly to take ownership of particles after the cut point, inheriting identical physics and rendering materials.
  4. Both severed halves swing and react independently according to their respective momentum.