Search Unity

Chained Car Behaviour of Chain

Discussion in 'Physics' started by SoftTechGamingStudio, Sep 21, 2017.

Thread Status:
Not open for further replies.
  1. SoftTechGamingStudio

    SoftTechGamingStudio

    Joined:
    Feb 1, 2017
    Posts:
    4
    Any prototype to make same chain behaviour like in the video

     
  2. pauloaguiar

    pauloaguiar

    Joined:
    May 13, 2009
    Posts:
    700
    There is a tutorial ,search in youtube how to create a rope,is the same as chain. then attach to the cars.
     
    SoftTechGamingStudio likes this.
  3. SoftTechGamingStudio

    SoftTechGamingStudio

    Joined:
    Feb 1, 2017
    Posts:
    4
    There is no such video with this behaviour ..
    Mostly are for 2d rope that works
     
  4. pauloaguiar

    pauloaguiar

    Joined:
    May 13, 2009
    Posts:
    700
  5. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I know you meant well, but don't nest like that, it is not a good technique for performance.

    For a start, rigidbody children ignore parents during simulation. They have their own hierarchy which is governed by joint connectivity or compound colliders, so a lot of performance is lost.
     
    SoftTechGamingStudio likes this.
  6. SoftTechGamingStudio

    SoftTechGamingStudio

    Joined:
    Feb 1, 2017
    Posts:
    4
    Messed with this already , if the rope is static at one side and move from other side it swings cool like rope
    but if you drag two ends at the same time it behaves weird.
     
  7. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Your problem is much greater than this. Physics engines aren't very good at rope by default due to the iterative nature (a bit more is solved each frame), so usually you want a custom joint done in software that can't break or pull apart. You can do some searches, it's very well covered on these forums. In addition asset store has rope that probably solves all this:

    https://assetstore.unity.com/packages/tools/physics/obi-rope-55579

    or

    https://assetstore.unity.com/packages/tools/physics/ultimate-rope-editor-7279

    Otherwise if you're not going to code your own rope, then you probably should increase iterations etc in options. I can't help more because several threads already cover this. Good luck.
     
    SoftTechGamingStudio likes this.
Thread Status:
Not open for further replies.