• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

a question about the camera...

Status
Not open for further replies.
Level 2
Joined
Aug 18, 2004
Messages
17
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?
 
Level 5
Joined
Sep 27, 2004
Messages
167
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.
 
Level 2
Joined
Aug 18, 2004
Messages
17
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?
 
Level 3
Joined
Sep 26, 2004
Messages
55
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.
 
Level 2
Joined
Aug 18, 2004
Messages
17
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.
 
Level 2
Joined
Oct 5, 2004
Messages
33
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
 
Level 2
Joined
Aug 18, 2004
Messages
17
now it works. i didnt need the function, i only changed some z-offset and AoA values, thx guys.
 
Level 3
Joined
Sep 26, 2004
Messages
55
Well, no problem, i just wonder, does legacies have any mountains? i'd like to know... i never saw any...
 
Level 2
Joined
Oct 5, 2004
Messages
33
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
 
Status
Not open for further replies.
Top