Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Script for auto movement with intersections

Discussion in 'Scripting' started by Zyglthall, Mar 2, 2015.

  1. Zyglthall

    Zyglthall

    Joined:
    Mar 2, 2015
    Posts:
    1
    Hi,

    I am currently working on a game project for my training. It's in 2D top view, and the player doesn't really control the character (a ship). He starts orbitating around a star. He must follow path between planets. We can choose path with arrow key. Also, to simulate gravity, when the player approach a planet, he can choose between a few paths like the picture attached.

    I tried Beziers curves and iTween but I can't get the movements as smooth as it has to be... So I would like to know what kind of script would you recommand for this kind of paths ?

    PS : I'm a newbie at scripting, and I script in C#. And I'm french, sorry for my poor english.

    Thanks !
     

    Attached Files:

    • zoom.JPG
      zoom.JPG
      File size:
      37.3 KB
      Views:
      708