HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Camera height

08-21-2006, 07:53 PM#1
Cerdinz
My camera is currently following a unit around a section of a map using the "Lock Camera Target" function, unfortunately there is a hill in this area and the unit rises up and out of the screen.
How do I make the camera smoothly adapt to the height of the unit?
08-21-2006, 08:52 PM#2
Freakazoid
Create a region acros each "hill", when the unit enters the region, change the camera distance to target larger, or Field of View.
08-21-2006, 08:53 PM#3
Cerdinz
How do I change the camera's distance without creating a new camera object or losing the lock?
08-21-2006, 09:51 PM#4
Alevice
Camera - Set camera field. Or something like that.
08-21-2006, 11:27 PM#5
Cerdinz
Yeah that worked, there's a height offset option that's hard to spot

Camera - Set Player 1 (Red)'s camera Height Offset to 100.00 over 1.00 seconds
08-22-2006, 01:33 AM#6
TheEpigoni
Cerdinz, if you're actually interested in making an fps map. The engine has already been built. I linked you to the FPS Mod forums in your other thread. It covers everything from physics to mouse facing to camera height and control. Including the weird bugs you're going to get with camera height. So if you're really serious about the project I suggest you at least look at the code that's already there for you.
08-22-2006, 04:48 PM#7
Cerdinz
I did download some of the .zip files, but they contained .exe documents. I tried launching them but it asked me for an address so I had no idea what to do from there. I figured I'd have to run the exe from the map somehow and I only just started learning JASS, so I figured I'd come back to the project later.
Although I will search for the heigth bug now that you mention that it is in that part of the forum

Edit: seems I just spotted your tutorial, I'm doing it now
08-22-2006, 04:59 PM#8
Thunder_Eye
the height bug sucks :/ My FPSRPG is paused until I find the out formula
08-22-2006, 06:14 PM#9
TheEpigoni
Thunder_Eye, I have a function in my map which solves the height issue. It constantly re-adjusts the height difference between the camera and the height of the unit to account for the "hill smoothing" the camera does. I suggest you check out the code. It's relatively simple.

P.S.
I stickied the camera tutorial. Forgot about that before.