Rope
This component inherits from Handle.
Overview
This component provides an easy way to set up ropes that can be grabbed by the player.
This kind of rope is static. If you are looking for a rope for hanging lanterns, see RopeSimple.
Setup (Horizontal / Point-To-Point)
Point-To-Point ropes will generate a rope that links from the RopeStart
transform to the RopeEnd
transform.
- Find the RopeHorizontal prefab in the SDK examples folder.
- Place the prefab in your scene, drag RopeStart and RopeEnd to the desired start and end point of your rope.
Setup (Vertical / Dynamic)
Dynamic ropes will generate a rope that reaches from the RopeStart
transform to the nearest floor.
- Find the RopeVertical prefab in the SDK examples folder.
- Place the prefab in your scene and move it to where the top of your rope should be.
- Ensure there is at least one non-trigger collider directly below the rope, with the distance to the rope being less than the value specified in the
Raycast Range
property.
Component Properties
Field | Description |
---|---|
Rope Start | A transform that will act as the starting point of the rope. |
Rope Target | A transform that will act as the ending point of the rope. |
Rope Radius | Controls the radius of the generated rope mesh. |
Rope Material | The material to apply to the generated rope mesh. |
Rope Use Collider | Should the rope have a physics collider? |
Rope Layer | The layer that the generated rope object should be set to. |
Rope Physic Material | The physics material that will be applied to the generated rope object’s collider. |
Rope Tag | Tag to apply to the generated rope object. |
Dynamic Height | |
Dynamic Height | Should this rope use Dynamic Height? |
Raycast Range | How far to check for a floor to place the end of the rope at. |
Height From Ground | How far above the floor the end of the rope should be. |
Notes
• Rope Object
The mesh and collider generated by this component are placed on the RopeStart
game object.
• Rope Radius
The value provided for Rope Radius
is halved ingame.
Common Issues
• Missing/Broken Handle
If your rope appears ingame but has no handle, or the handle is not working, ensure that:
- The
interactable Id
property has been filled in and is spelled correctly. - There is a RigidBody component alongside your Rope component, with
Is Kinematic
set to true. - There is at least one child HandPose on your Rope.
• Dynamic Rope Is Not Vertical
If your dynamic rope is skewed, ensure the object that has the rope component is in the same location as the RopeStart
object.
• Rope Object Positioned Incorrectly
If your rope does not appear in the correct position, check that:
- The object that has the Rope component is not set as the
RopeStart
transform. - The object acting as RopeStart/RopeEnd is not a child of the Rope object, or vice-versa.