Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question How can i replicate this springs physics mechanic?

Discussion in 'Physics' started by tnhoanglonghd, Aug 6, 2020.

  1. tnhoanglonghd

    tnhoanglonghd

    Joined:
    Oct 10, 2016
    Posts:
    3
    Hi guys!
    I'm trying to replicate this game mechanic. And I got stuck at making the pipe like the video below:

    I spent a week of researching with no results.
    Anyone please help me. Thank you!
     
  2. payalzariya07

    payalzariya07

    Joined:
    Oct 5, 2018
    Posts:
    85
  3. tnhoanglonghd

    tnhoanglonghd

    Joined:
    Oct 10, 2016
    Posts:
    3
  4. tjmaul

    tjmaul

    Joined:
    Aug 29, 2018
    Posts:
    466
    Probably a line renderer and a bezier curve as its positions. Or a piecewiese bezier curve. Anyhow, try to replicate this with some rigidbodies that give you the position and rotation of the control points of a curve.

    I used this tutorial for bezier curves and found it very good:
    https://catlikecoding.com/unity/tutorials/curves-and-splines/