Hello,
I have a bunch of monsters added to my game with my Monster class.
I am looking for a formula to sort through y-values + modify all the z-values of the monsters so the ones at the bottom of the screen appear to be closer than those at the top.
To access my monsters in my monster array I would do so like this:
for monster in Monsters{
}I could easily create a function that could return the y-value of each monster and add it to an array... But I don't know where to go from there. Anyone able to write up a formula I could use? It seems like something fairly simple but for some reason its not coming to me.
Even if I had an array of each of the monsters y-values, I don't know how I would re-assign the z-values? I am confused.