| 11-16-2003, 04:49 PM | #1 |
how know the height of a unit, not the flying height. I want that the camera stay always behind a unit and at the same height. i don t found a trigger whom refer to the unit height. plz help me :) |
| 11-16-2003, 08:08 PM | #2 |
I think that isn't possible with normal scripting. For FPS mod they needed a special tool (external program) and a weird way of scripting to achieve this. |
| 11-17-2003, 12:52 PM | #3 |
I think there might be a way. There are two functions that operate on the terrain height: GetCameraEyePositionZ() and GetCameraTargetPositionZ(). If you moved the camera for each player to the given spot, then you can use either of these functions to get the terrain height. I tried this but it proved to be troublesome since you need a wait in between moving the camera and getting the Z position, and you can't use a dummy player since only real players have a camera. |
| 11-17-2003, 01:30 PM | #4 |
well, if you only want to get the terrain hight, this shouldn't be the problem. There is a JASS function that returns the height level and then you could use Zepir's w3e specs to calculate the real hight level from that |
| 11-17-2003, 02:22 PM | #5 |
He does mean the height of a unit right? I think the GetCameraTargetPositionZ() function reacts on units, so you could subtract the terrain height from that and get the unit's height. |
| 11-17-2003, 04:36 PM | #6 |
thx u very much :foot: but can someone make a little exemple map for me ?? :ggani: |
| 11-24-2003, 02:07 PM | #7 |
in reality, i think that "GetCameraTargetPositionZ()" refers to the ground target, not to the tageted unit. i realy need this camera, i posted a message in FPS forum and i m waiting for a reponse :) |
