| 05-13-2009, 02:53 AM | #1 |
I need to find the target height of a camera object (actually many camera objects). There doesn't seem to be a native that does it (is there?). GetLocationZ() doesn't produce the same result (albeit it is quite close at times), which leaves me with the option of panning the camera to the object and using GetCameraTargetZ(). This method sucks hard, so is there any other way? |
| 05-13-2009, 01:18 PM | #2 |
native CameraSetupGetDestPositionX takes camerasetup whichSetup returns real
native CameraSetupGetDestPositionY takes camerasetup whichSetup returns real sounds pretty much like what you want. edit: Z oh... well you don't necessarily have to pan the camera there. Just check the terrain's height there and add the camera object's z-offset to that value. |
| 05-13-2009, 10:33 PM | #3 | ||
Quote:
Quote:
|
| 05-14-2009, 09:47 AM | #4 | |
Quote:
|
| 05-16-2009, 10:02 PM | #5 |
Those values pertain only to the camera currently in place for the player. What I need is a method of finding the target Z at an arbitrary point on the map.I guess I could possibly take an average of terrain heights over an area (unless someone knows how the smoothing is actually calculated). My current solution is: pan camera to camera object and take its Z reading. Then for a moving camera, for small increments in distance, the Z of the next location will be ~ Z of the previous location. With the only issue being here that pan camera is not instant, a wait is required, which increases time to take the readings. |
