The object you wish to hang must have a RigidBody component on it.
Add Component
in the Unity inspector and add the RopeSimple component to your new object.Target Anchor
field.Field | Description |
---|---|
Target Anchor | A transform referencing the position that this rope will link to. |
Spring Joint | |
Spring | The force used to keep the rope at its maximum length. |
Damper | How much force should be applied to slow the ropes swinging. |
Min Distance | How low the distance can be between the hanging object and the anchor point. |
Max Distance | How great the distance can be between the hanging object and the anchor point (relative to starting point). |
Connected Body | The rigidbody linked to this ropes spring joint. 1 |
Rope Mesh | |
Radius | Controls the radius of the generated rope mesh. |
Tiling Offset | The vertical tiling to be applied to the generated rope mesh's material. |
Material | The material to apply to the generated rope mesh. |
Audio | |
Effect Id | The EffectData ID to use for this rope. 2 |
Audio Min Force | The lower range for the force used when calculating the effect intensity. |
Audio Max Force | The upper range for the force used when calculating the effect intensity. |
Audio Min Speed | The lower range for the speed used when calculating the effect intensity. |
Audio Max Speed | The upper range for the speed used when calculating the effect intensity. |
When the SimpleRope's rigidbody is not sleeping, it will play the effect referenced by Effect Id
.
The intensity of this effect is calculated by the amount of force stretching the rope, multiplied by the velocity of the hanging object's rigidbody.