• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Camera Height

Status
Not open for further replies.
Level 8
Joined
Jun 20, 2004
Messages
229
Still having alot of trouble figuring this out.

If I create a map and using tool palette or random height option in map editor when, and set player camera height to 0 in game the camera will be incorrect.

-Like, itll sometimes even be higher or lower than the ground even through its set to 0 meaning the 0 point which I should see a line in the middle but alot of the time its random. For testing, I created a tall hill, and formed it into a plateu so it had a flat surface on top. I set the cam height to 0 and a number like 75 for further testing. And what happened was it would be different height sometimes while moving around on the surface of the plateu which is compeltey the same height on top. The cam height readout is saying the correct height but its just NOT right and no idea why its off.

But, if I use terrain deformaton via triggers on an unedited flat map with no terrain changes 0 height will start from the very middle of the map Z height 0. Then all I had to do was use a jass script to find the terrain height of a point then add it to that and it would be PERFECT. But it wont work on terrain changed in map editor. If I find Zheight of a location when using a map that has height changed using the map editor terrain palette, Zheight detects WAY too high I mean atleast a few hundred off.

Does anyone know why its all messed up, im about to email blizz on this its rediculious. The camera shouldnt be any differnt on trigger changed terrain height and map editor formed height and the camera is what is messing up, the readouts are fine.

Ill keep bumping this one until some1 might know, if what I said wasnt clear enough I can try explaining better or even show a small map of whats happening.

Thanks
 
Level 8
Joined
May 26, 2007
Messages
214
Okay ... heres the idea tricky






___________________________________________________________

That is the ground.

0 is the default height between positive and negative, if you go negative, the camera will go under the terrain. If it is at 1. It will be barely above the ground. Thats why you're camera is like that.

Try creating a camera and experimenting with it.

Heres an idea also I learned this a couple days ago

Press CTRL then rightclick and scroll around it will move you're camera at any angle you want.
 
Level 8
Joined
Jun 20, 2004
Messages
229
lol, i realize it goes below and above 0, and 0 is the epicenter. But, the camera height isnt correct when setting it to any number if the terrain is edited in map editor by making the ground higher or lower. Naturally, setting the cam to 0 on a completely flat map works fine, and so does finding the z height of the location and then setting it to that as well which would be 0 too. But, if I change the terrain using triggers, then just setting the cam height to 0-100 (I use 0 because its an exact marker which you can tell if its the right height or not) and it would be off by alot. But if I use terrain heights created using map editor with terrain palette, the Z height script isnt right and is too high past 0 but using the regular cam height is off too past 0. So basically all I can do for a 100% correct camera height, is to use Z height and use a flat map with deformation triggers to make random height fields but you can only do so much with that.
 
Level 8
Joined
Jun 20, 2004
Messages
229
im just trying to get it so the camera stays at a set height above any terrain. So for example I want the camera height to be eye level at say 75, it needs to be 75 height above the ground everywhere you go, assuming it is a unit you control. This, I have already done... but it only works if you use triggers with deformation, and is messed up if you make hills and slopes ect in map editor.
 
Level 5
Joined
May 27, 2007
Messages
132
Hmmm, not sure how possible that really is. The game engine is pretty limiting when it comes to stuff like this.

Where is the camera attached exactly? That might have something to do with it. But the problem is probably hard coded into the game.

Have you locked the camera to the unit?
 
Level 8
Joined
Sep 15, 2006
Messages
426
How did you do it, Tricky? I had a similar problem in my map, and it can be solved with a line of JASS. It definately works even with slopes made in the editor. If you could post your triggers, I might be able to tell you something.
 
Level 8
Joined
Jun 20, 2004
Messages
229
Set Pan_Position = (Position of UnitPerson[(Player number of (Picked player))])

Custom script: set udg_LocZ=GetLocationZ(udg_Pan_Position)

Camera - Set (Picked player)'s camera Height Offset to (75.00 + LocZ) over 0.00 seconds



These are in a pick player action, but I left out the rest of the cam stuff, these are the ones reguarding height. This only works if you set heights via triggers, works perfect and 100% accurate.
 
Level 8
Joined
Sep 15, 2006
Messages
426
I don't see why that shouldn't work. I've got basically the same trigger in my map, and it works with the normal WE hills and clifs fine.
 
Status
Not open for further replies.
Top