- Home /
Draw perimeter around player range in grid based game
I basically want to draw a line of some sort at the outer perimeter of the players range. here is an example from the game flashpoint that does exactly what I need.
I would also love to be able to draw the grid but I can make a separate question for that if needed. I have tried using a line renderer but i'm not sure of the best way to get the points to feed it.
the link photo is not actually drawing lines. they are using a set of prefab images that represent corners and strait lines and such to place in a grid like placement. the images are square with transparent green line parts that make it look like lines. Very good approach. as far as finding the area, there are many alorithms for flood filling grids, edge detection, path finding and so on to detect where boundrys are and what type or direction you might place images like this. if you have a grid like game with grid data and need help with algo's let me know.
Answer by nazalas · Sep 14, 2018 at 11:33 AM
I am not sure I understand. What do you mean by they are image prefabs. It sounds like you are saying they have some toggleable pieces attached to each cell. If so, how would I go about doing that? Also, thanks for the info on flood filling, I didn't know that's what it was called and I guess I kinda wrote my own but it's not very good. @toddisarockstar
Your answer

Follow this Question
Related Questions
Grid Based Movement System AI freezing? 1 Answer
Grid Layout Group not working for 3d cube 0 Answers
How do you find adjacent tiles of the same type in grid array [x,y].type == [x+1,y].type 0 Answers
2D Isometric grid movement direction 0 Answers
How do I swap gameObjects on a list by clicking in the UI? 1 Answer