Warcraft III resources & community, 2003–2006 · archived

a question about the camera...

11 posts
#1

a question about the camera...

i have a problem with a camera function, and i've heard you coded your own, can you tell me how to change the z-offset of the cam if the unit stands on a hill? its hard to explain, i try to make a ascii pic:
1.
__
\__U___<-C
everything is alright, the camera follows the unit
2.
___U___
_/ \___<-C
the cam doesnt change the z-offset! (you can't see the unit)

can you help me?
#2
When you have the cam locked, i guess you lock it every 0.1 sec right? Now when you do that trigger, set the camera Z value to the Z value of the unit. This should give them the same height all the time.
#3
i tried it, but there is no function that returns the z value of a unit! i use the camera system of WEU. if i do a periodic event with set cam's height offset to target z of current cam, the camera flies to the unreachable heights :-( . some ideas?
#4
LoA's camera does not follow when the height changes rapidly, therefor i implented a function that makes u able to control the cameras angle so that it does not bug in those situations, however, there's no function that ive found that changes the Z of camera as soon as unit moves on higher groud, if u just set it to like... 130 or something from start it'll work with ground height that gets higher slowly, not instantly.
#5
thx, i will try it. did you have the following problem with the water too? if the unit is on a bridge or sth. or in front of a lake, the camera rapidly goes down.
#6
with legescies tides of the serpent the camera stays the same the whole time and they go up and down but their is no difference
#7
now it works. i didnt need the function, i only changed some z-offset and AoA values, thx guys.
#8
Well, no problem, i just wonder, does legacies have any mountains? i'd like to know... i never saw any...
#9
well i was playing it yesterday and well when u go up the camera jumps up to fix back to the view that it uses the whole game but there is a small hill that makes the camera change
#10
I'd guess they just made a region that makes camera go higher at that specific point...
#11
yeah that sounds right