| 05-31-2006, 11:31 AM | #1 |
Is there any secure way to find out the center of a players screen? Without locking the camera to a unit. |
| 05-31-2006, 11:57 AM | #2 |
JASS:// These return values for the local players camera only... constant native GetCameraBoundMinX takes nothing returns real constant native GetCameraBoundMinY takes nothing returns real constant native GetCameraBoundMaxX takes nothing returns real constant native GetCameraBoundMaxY takes nothing returns real constant native GetCameraField takes camerafield whichField returns real constant native GetCameraTargetPositionX takes nothing returns real constant native GetCameraTargetPositionY takes nothing returns real constant native GetCameraTargetPositionZ takes nothing returns real constant native GetCameraTargetPositionLoc takes nothing returns location constant native GetCameraEyePositionX takes nothing returns real constant native GetCameraEyePositionY takes nothing returns real constant native GetCameraEyePositionZ takes nothing returns real constant native GetCameraEyePositionLoc takes nothing returns location If you need this information synchronously, you have to bust out some clever hacks. Synchronizing data was first figured out by AIAndy. PitzerMike adapted and optimized this for syncing camera locations. See this wc3jass thread. |
| 05-31-2006, 01:03 PM | #3 |
Damn the thread is confusing. Im only just learning about threads (not forum threads) I understand a wait in conflict with LocalPlayer will cause a crash. But rawish data like the natives you posted baffle me Anway, i think JASS:constant native GetCameraTargetPositionX takes nothing returns real constant native GetCameraTargetPositionY takes nothing returns real constant native GetCameraTargetPositionZ takes nothing returns real Are the natives i want, il test them soon. Thanks Pipe |
