0
\$\begingroup\$

I'd like to be able to render flexible lines, or ropes, as below:

enter image description here

I thought about using a Line Renderer but it doesn't have the flexibility to render arbitrary curves.

\$\endgroup\$
0

2 Answers 2

6
\$\begingroup\$

This effect can be easily accomplished with just hinge joints.

enter image description here

This above gif, was created without any code whatsoever. Each link in the chain is connected to the one above it via a Hinge Joint 2D. You can play around with the mass of the rope vs the object it is holding for better physic response

Point is, you shouldn't be using a line renderer for something like this.

\$\endgroup\$
-3
\$\begingroup\$

Its by using SetPosition Property. Have a look at this.

http://docs.unity3d.com/ScriptReference/LineRenderer.SetPosition.html

Hope this helps.

\$\endgroup\$
1
  • \$\begingroup\$ Perhaps you didn't fully read the question? This is a very incomplete answer. \$\endgroup\$
    – House
    Commented Feb 26, 2016 at 14:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .