Update: Player Scripts
The problem here is to keep the player camera Z height and rotation in the correct orientation relative to the FOV zoom ratio.
Choosing the best camera offset "float" value is difficult to determine at this stage.
So far the camera position and FOV scripts only load once, when the Game World loads.
It'd be far better if the FOVs could load anytime the player picks up a weapon.
Code:
// ZOOM FOR FPS PLAYER UNITS
// Zoom - Mouse Move Adjustment
if( World.Instance.Simulation && Instance.MouseRelativeMode )
{
Vec2 OffsetZoomMove = MousePosition
if( GetPlayerUnit() != null && GetPlayerUnit() is PlayerCharacter )
if( GetPlayerCameraType() == PlayerCameraType.FPS )
OffsetZoomMove /= 3; float value
Controls.Instance.DoMoveRelative( OffsetZoomMove );
}
// Zoom - Camera FOV & Zoom Camera Offset
if( Instance.IsEkeysMouseButtonPressed( EkeysMouseButton.Right ) )
{
if( GetPlayerUnit() as PlayerCharacter != null )
if( GetPlayerCameraType() == PlayerCameraType.FPS )
cameraFov /= 6;
cameraOffset /= 3;
}