- Joined
- Feb 2, 2006
- Messages
- 1,631
Is it really not possible to detect the actual Z value of the seabed below water?
I have already found these threads about this topic:
and there is no solution mentioned. I do not want to go with a fake water surface and flying units since I think that some of Warcraft's functionality will get lost like standard spells as Submerge or the floating units etc. I think that swimming units also add some water effect by default etc. and Warcraft's water might have some additional stuff which I don't know of yet and which might be hard to reproduce.
In this post there is a system mentioned which should return the correct camera offset for every location on the map. It seems to scan the map initially and somehow calculate the correct Z value: [General] - How to make water deeper?
However, this system did not work for under water locations. It works with GetLocationZ() and this function does not return any different Z value if there is a cliff under water.
In my map I have created a rather deep ocean and if I move the camera under water it will automatically get higher on locations where tehre is a cliff under water but GetLocationZ will always return the same value (maybe the one of the water surface?!), so Warcraft's camera system seems to know that there is a cliff but somehow GetLocationZ has special treatment for water areas?
I can only think of these two solutions:
Blockers are no option since they will block units above the water!
Here is a screenshot of my map, so you can get a better understanding of the issue (the under water cliffs in the distance should return a different Z than the current location but they don't!):
I have already found these threads about this topic:
and there is no solution mentioned. I do not want to go with a fake water surface and flying units since I think that some of Warcraft's functionality will get lost like standard spells as Submerge or the floating units etc. I think that swimming units also add some water effect by default etc. and Warcraft's water might have some additional stuff which I don't know of yet and which might be hard to reproduce.
In this post there is a system mentioned which should return the correct camera offset for every location on the map. It seems to scan the map initially and somehow calculate the correct Z value: [General] - How to make water deeper?
However, this system did not work for under water locations. It works with GetLocationZ() and this function does not return any different Z value if there is a cliff under water.
In my map I have created a rather deep ocean and if I move the camera under water it will automatically get higher on locations where tehre is a cliff under water but GetLocationZ will always return the same value (maybe the one of the water surface?!), so Warcraft's camera system seems to know that there is a cliff but somehow GetLocationZ has special treatment for water areas?
I can only think of these two solutions:
- Manually add Z offsets for rects where there are cliffs under water: Really much work to do.
- Somehow move the camera on all locations of the map and get the actual Z value by using some absolute Z value function for the camera height if there is any (I don't know this yet).
Blockers are no option since they will block units above the water!
Here is a screenshot of my map, so you can get a better understanding of the issue (the under water cliffs in the distance should return a different Z than the current location but they don't!):
