Search Unity

In game object placement [RTS Question]

Discussion in 'Scripting' started by TimSchames12, Nov 28, 2015.

  1. TimSchames12

    TimSchames12

    Joined:
    Nov 28, 2015
    Posts:
    1
    Hi! Long time lurker and i'd really love some pointers on how to achieve a object placement system much like the ones seen in RTS Games such as Stronghold 2.

    Essentially, i'm hoping to be able to place walls and such in game but i've not been able to find any ways to do it as of yet.

    Does anyone have any ideas?

    Video example:
    youtu.be/MJvwsrU9DL8?t=5m55s
     
  2. LeftyRighty

    LeftyRighty

    Joined:
    Nov 2, 2012
    Posts:
    5,148
    that looks like it works off a grid (most rts do for building placement), with the wall "pathfinding" to the mouse position (get the right parameters and it should want to go straight more than diagonal etc.)
     
    Kiwasi likes this.