A simple component generates a rope, rendered as a line, between two GameObjects.
https://docs.unity3d.com/Packages/com.unity.package-manager-ui@2.0/manual/index.html
{
"dependencies": {
"com.scottdoxey.unityropecontroller": "https://github.com/neogeek/UnityRopeController.git#v1.0.0",
...
}
}
- Create a GameObject with a kinematic
RigidBody
andLineRenderer
components. - Attach the
RopeController
and connect theRigidBody
to theAnchor
property and theLineRenderer
to theLineRenderer
property. - Create a second GameObject with a kinematic
RigidBody
. - Attach that
RigidBody
to theTarget
property of theRopeController
component on the first GameObject.