Search Unity

How to make a player like in Oils Well?

Discussion in 'Scripting' started by Parona, Aug 8, 2019.

  1. Parona

    Parona

    Joined:
    Apr 29, 2016
    Posts:
    8
    I can't figure it out to make a player movement like in the game "Oils Well". I think you would do it with waypoints that store the direction you can go so you only can go in a direction when the player is at the waypoint. Also i dont know how to make the line behind the player.

    Does anyone have an idea?
     
  2. palex-nx

    palex-nx

    Joined:
    Jul 23, 2018
    Posts:
    1,748
    It does not looks like a challenging problem. Implement regular digger-like movement like a if button.pressed then add 1 to pos.x and put anchors when player changes direction. When he press space for example pull him to prev anchor point until there are more points. If not, he's at start position.
     
  3. Parona

    Parona

    Joined:
    Apr 29, 2016
    Posts:
    8
    Thanks for the answer! I managed to get the player movement working but i still have a problem with the line. The line renderer can't draw a straight line in 2d mode. :/ Do you know if there is any other way?
     
  4. palex-nx

    palex-nx

    Joined:
    Jul 23, 2018
    Posts:
    1,748
    I haven't used line renderer alot. But it should. Probably it is orientation problem. Try to check rotations of points/renderer itself. Also note it is 3d tool and not meant to be used in canvas.