Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. On February 28th the Feedback website will shut down and be redirected to the Unity forums. See the full post for more information.
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Unity 2018.3 is now released.
    Dismiss Notice
  7. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

add fishing line physics to a line render

Discussion in 'Physics' started by Sylon87, Sep 16, 2018.

  1. Sylon87


    Aug 20, 2018
    hello everyone.
    i want to add physics to my line render to simulate a fishing line, like now what i have is this

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    5. public class line : MonoBehaviour {
    7.     public Transform origin;
    8.     public Transform target;
    10.     public LineRenderer lineRenderer;
    12.     // Use this for initialization
    13.     void Start () {
    15.     }
    17.     // Update is called once per frame
    18.     void Update () {
    20.         lineRenderer.SetPosition(0,origin.position);
    21.         lineRenderer.SetPosition(1,target.position);
    23.     }
    24. }
    there is a way to add a physics to it?
  2. halley


    Aug 26, 2013
    Strings, cables, ropes in the real world have very complicated physics. At rest, a string held at both ends will sag into a catenary curve, which by itself needs more complex math than many things in Unity. Add wind or the strength of the fish and it gets even more complicated.

    Look through the store for wire or cable solutions. There are a few. I have tried several and they often have some annoying limitations.