It's propably read-only. I have no idea which fields actually can be altered with this function, but this most certainly can't, since it would cause massive desync (you can change the value for only one player, so propably it's just some GUI settings that this function can change)
How is that? If you mean terrain height, then not, since I suggested to keep the height test you use, only to change the XY position test, which should not be affected by terrain.
The tutorial is nice, however the function is very inefficient. You should create a line between camera position and clicked location and simply calculate distance from this line for every unit in the general area. You would save the 100 loops. (This test the unit position in 2D, to test it's heigh, calculate distance from camera and you the same formula with Tangens you already used, just calculate constant tangens outside loops)
0
It's propably read-only. I have no idea which fields actually can be altered with this function, but this most certainly can't, since it would cause massive desync (you can change the value for only one player, so propably it's just some GUI settings that this function can change)
0
How is that? If you mean terrain height, then not, since I suggested to keep the height test you use, only to change the XY position test, which should not be affected by terrain.
0
The tutorial is nice, however the function is very inefficient. You should create a line between camera position and clicked location and simply calculate distance from this line for every unit in the general area. You would save the 100 loops. (This test the unit position in 2D, to test it's heigh, calculate distance from camera and you the same formula with Tangens you already used, just calculate constant tangens outside loops)