| 02-23-2004, 09:42 PM | #1 |
I found that the camra z goes down for no reason i found this soultion in fps . function CamZAdjust takes nothing returns nothing local real TrueHeight = GetHeight(GetUnitLoc(udg_FPSunit[1])) + 100.0 + GetUnitFlyHeight(udg_FPSunit[1]) set udg_TempCam = TrueHeight - GetCameraEyePositionZ() call SetCameraFieldForPlayer( Player(0), CAMERA_FIELD_ZOFFSET, GetCameraField( CAMERA_FIELD_ZOFFSET ) + udg_TempCam, 0.01 ) endfunction Will this work on mult player? |
| 02-23-2004, 11:06 PM | #2 |
GetCameraEyePositionZ() produces a local value. So everything you do with that value has to be done under care. It does not cause de-sync to use this function, but it causes de-sync if you use the value gotten by this function the wrong way. This should not cause de-sync as it only does something for the player you're working with. You can add it into a local if statement if you want to be safe, but generally this should be ok. |
| 02-23-2004, 11:36 PM | #3 |
So if i just use it so set a local camra height i should be ok. I know better not to assagin it to global varable . |
