Warcraft III resources & community, 2003–2006 · archived

Help: Camera following Units

6 posts
#1

Help: Camera following Units

Okay, basically what my map needs to entail is a simple way for a camera (or the 'camera of the player' as set by triggers) to follow a unit around. Before everyone suggests the "Lock Target to Unit" I've already done the simple bit, including setting the correct angle of attack. My probelm is that when the unit goes up ramps/stairs or changes its height in any way, the camera doesn't change its Z Offset, and thus, doesn't get any higher. I need to know how I can make this camera follow a unit even as far as height is concerned.
:wink: Any and all help is appreciated :D

Thanks
#2
change camera height avvording to height of terrain every ____ seconds?
#3

Or

Or you could do it the harder way, but much more accurate. If you remember the Pythagroem theorem, you could do this. Just imagine that the camera is at one point where the unit is at another point.
#4
Or you could do it the easier way


Fixed.

Anyways, The general solution to this tends to be making Rects which tell the camera if there is a bridge, etc, there. You could also EnumForDestructablesInRect if you must.
#5
Pythagorean

harder


HAHAHAHAHAHAHAHAHAHAHAHAHA
#6
harder is calculating a 3d reflection vector lol >.>