Jump to content

A question about CameraAngleLimits in view.cfg


ESA_PIRAO

Recommended Posts

Hi,...

 

I've seen that in 1.12 somethings changed in view.lua

 

In the past (when i've instaled 1.1) i had problems with the zoom set to a rotatory in the X45.

 

I solved it changing the CameraAngleLimits in view.cfg

http://forum.lockon.ru/showthread.php?t=9130

 

But now when i patch to 1.12 this parameters are changed

 

NOW

-- Camera view angle limits {view angle min, view angle max}.

CameraAngleLimits = {}

CameraAngleLimits[PlaneIndex.iSu_27] = {160.0, -76.0, 110.0}

CameraAngleLimits[PlaneIndex.iSu_33] = {160.0, -79.0, 110.0}

CameraAngleLimits[PlaneIndex.iSu_25] = {109.0, -70.0, 105.0}

CameraAngleLimits[PlaneIndex.iSu_39] = {116.0, -85.0, 110.0}

CameraAngleLimits[PlaneIndex.iMiG_29] = {160.0, -80.0, 110.0}

CameraAngleLimits[PlaneIndex.iMiG_29K] = {140.0, -65.0, 90.0}

CameraAngleLimits[PlaneIndex.iA_10] = {160.0, -72.0, 110.0}

CameraAngleLimits[PlaneIndex.iF_15] = {160.0, -81.0, 110.0}

 

function GetCameraViewAngleLimits(iType)

local p = CameraViewAngleLimits[iType]

return p[1], p[2]

end

 

function SetCameraViewAngleLimits(iType, viewAngMin, viewAngMax)

local p = CameraViewAngleLimits[iType]

p[1] = viewAngMin

p[2] = viewAngMax

end

 

In the 1.11 and 1.1

 

-- Camera view angle limits {view angle min, view angle max}.

CameraViewAngleLimits = {}

CameraViewAngleLimits[PlaneIndex.iSu_27] = {20.0, 120.0}

CameraViewAngleLimits[PlaneIndex.iSu_33] = {45.0, 120.0}

CameraViewAngleLimits[PlaneIndex.iSu_25] = {20.0, 120.0}

CameraViewAngleLimits[PlaneIndex.iSu_39] = {75.0, 120.0}

CameraViewAngleLimits[PlaneIndex.iMiG_29] = {40.0, 120.0}

CameraViewAngleLimits[PlaneIndex.iMiG_29K] = {40.0, 120.0}

CameraViewAngleLimits[PlaneIndex.iA_10] = {20.0, 120.0}

CameraViewAngleLimits[PlaneIndex.iF_15] = {20.0, 120.0}

 

function GetCameraViewAngleLimits(iType)

local p = CameraViewAngleLimits[iType]

return p[1], p[2]

end

 

function SetCameraViewAngleLimits(iType, viewAngMin, viewAngMax)

local p = CameraViewAngleLimits[iType]

p[1] = viewAngMin

p[2] = viewAngMax

end

You can note that now there are 3 parameters and not 2

And if you see the code,.., it seem that only catch and process 2 parameters

???????

 

I need to change the range (min-max) to regulate the middle position of the rotatory making that it be the same that the default view...

 

¿Can anyone explain a little how works now this parameters?

 

Thanks in advance to all...

 

ESA_PIRAO

www.cruzdesanandres.com

 

PD:Sorry me for my bad english,.., i try to explain myself but i don't know if i get it.

Link to comment
Share on other sites

No responses,..

 

:(

 

 

Anyway,...

 

If you observe good the code i've posted before in the 1.12 the variables names are CameraAngleLimits, and later the function use CameraViewAngleLimits.

 

In 1.11 the variable was CameraViewAngleLimits (the correct for the function)

 

So I imagine that this piece of code in view.lua now in 1.12 is obsolete.

 

I search more in the script to find the correct variables and i get it in server.lua

-- Camera angle limits {horizontal angle max, vertical angle min, vertical angle max}

CameraAngleLimits = {}

CameraAngleLimits[PlaneIndex.iSu_27] = {160, -76, 90}

CameraAngleLimits[PlaneIndex.iSu_33] = {160, -79, 110}

CameraAngleLimits[PlaneIndex.iSu_25] = {109, -70, 105}

CameraAngleLimits[PlaneIndex.iSu_39] = {116, -85, 110}

CameraAngleLimits[PlaneIndex.iMiG_29] = {160, -80, 110}

CameraAngleLimits[PlaneIndex.iMiG_29K] = {140, -65, 90}

CameraAngleLimits[PlaneIndex.iA_10] = {160, -72, 110}

CameraAngleLimits[PlaneIndex.iF_15] = {160, -81, 110}

 

function GetCameraAngleLimits(iType)

local p = CameraAngleLimits[iType]

return p[1], p[2], p[3]

end

 

function SetCameraAngleLimits(iType, hAngMax, vAngMin, vAngMax)

local p = CameraAngleLimits[iType]

p[1] = hAngMax

p[2] = vAngMin

p[3] = vAngMax

end

Now it seems that the function and variables are correct,....

 

But,.....

 

HOW CAN I CHANGE THE LIMITS OF THE ZOOM?

I need it to have a correct zoom value when i have the x45 rotatory in the middle.

 

Please DEVS give me the way to the knowledge...

 

:P

Link to comment
Share on other sites

Ok weta43,.., i've done it....

 

:)

 

I make it again,.., and now i clarify that the values contained in server.lua ( CameraAngleLimits) set the limits of the view when you rotate the head.

 

But the problem in 1.12 is still there.

 

CameraViewAngleLimits , the value that correct my problem in 1.1 and 1.11 is not more there in the scripts (or i can't find it). So i suppose that now the value to control the range of the zoom is other or not exist.

 

Anyway i appreciate all the info that you can provide me to fix the problem i have.

 

Thanks....

Link to comment
Share on other sites

HOW CAN I CHANGE THE LIMITS OF THE ZOOM?

I need it to have a correct zoom value when i have the x45 rotatory in the middle.

As far as I know it's not the 'server.lua' you should be fiddling with for zoom limits, it's the 'view.lua'. The 'server.lua' defines how far up,down left and right your head can move.

 

Go into 'view.lua' you'll see something like this.....

 

-- Camera view angle limits {view angle min, view angle max}.

CameraViewAngleLimits = {}

CameraViewAngleLimits[PlaneIndex.iSu_27] = {25.0, 106.0}

CameraViewAngleLimits[PlaneIndex.iSu_33] = {25.0, 106.0}

CameraViewAngleLimits[PlaneIndex.iSu_25] = {25.0, 106.0}

CameraViewAngleLimits[PlaneIndex.iSu_39] = {35.0, 120.0}

CameraViewAngleLimits[PlaneIndex.iMiG_29] = {25.0, 107.0}

CameraViewAngleLimits[PlaneIndex.iMiG_29K] = {25.0, 120.0}

CameraViewAngleLimits[PlaneIndex.iA_10] = {25.0, 80.0}

CameraViewAngleLimits[PlaneIndex.iF_15] = {25.0, 89.0}

.....this is where you set your minimum/maximum zoom limits.

Link to comment
Share on other sites

As always my head is spinning between all these view.lua, view.cfg, server.lua etc. scripts icon_eyes.gif hard to keep the overview, maybe you were confused as well? ;) I also have these values in the view.lua after all, with 1.12 - if you don't, it sounds like something's wrong with the installation...

Caretaker

 

ED Beta Test Team

Link to comment
Share on other sites

As far as I know it's not the 'server.lua' you should be fiddling with for zoom limits, it's the 'view.lua'. The 'server.lua' defines how far up,down left and right your head can move.

 

Go into 'view.lua' you'll see something like this.....

 

.......................

 

.....this is where you set your minimum/maximum zoom limits.

Yes, but it was in the 1.1,...

 

Now like you can see in my first post, it is changed. Now there are the same values (a matrix with three data)that the values in server.lua, and a function that only use two data (is like the old) that can't work. And the matrixs have another name (without the ...View...)

 

So,....

 

But thanks anyway Lixma 06, step by step i'm sure that we can solve my problem...

 

:P

Link to comment
Share on other sites

:confused:

 

I have 1.12 and i have no 3rd value in my 'view.lua'....

 

-- View scripts

-- Copyright © 2004, Eagle Dynamics.

 

-- Don't change existing values, they are requested from Ñ++!

-- Use these indices in Snap and CockpitLocalPoint tables.

PlaneIndex = {

iSu_27 = 1,

iSu_33 = 2,

iSu_25 = 3,

iSu_39 = 4, -- Su-39 or Su-25T

iMiG_29 = 5,

iMiG_29K = 6,

iA_10 = 7,

iF_15 = 8,

}

 

CockpitMouse = false

CockpitMouseSpeedSlow = 1.0

CockpitMouseSpeedNormal = 10.0

CockpitMouseSpeedFast = 20.0

CockpitKeyboardAccelerationSlow = 5.0

CockpitKeyboardAccelerationNormal = 30.0

CockpitKeyboardAccelerationFast = 20.0

CockpitKeyboardZoomAcceleration = 30.0

DisableSnapViewsSaving = false

UseDefaultSnapViews = false

CockpitPanStepHor = 30.0

CockpitPanStepVert = 30.0

CockpitNyMove = true

CockpitHAngleOrigin = 0.0 -- Obsolete. Use SnapViews.lua, please.

CockpitVAngleOrigin = -9.5 -- Obsolete. Use SnapViews.lua, please.

CockpitHAngleAccelerateTimeMax = 0.15

CockpitVAngleAccelerateTimeMax = 0.15

CockpitZoomAccelerateTimeMax = 0.925

 

function GetSnapAngles(iPlane, iKey)

local s = Snap[iPlane][iKey]

return s.hAngle, s.vAngle, s.viewAngle

end

 

function SetSnapAngles(iPlane, iKey, hAngle, vAngle, viewAngle)

local s = Snap[iPlane][iKey]

s.hAngle = hAngle

s.vAngle = vAngle

s.viewAngle = viewAngle

end

 

function WriteSnapViews(fileName)

local file = io.open(fileName, "w")

if file then

io.output(file)

local t = {}

Serialize("Snap", Snap, t)

io.close(file)

end

end

 

-- Camera view angle limits {view angle min, view angle max}.

CameraViewAngleLimits = {}

CameraViewAngleLimits[PlaneIndex.iSu_27] = {25.0, 106.0}

CameraViewAngleLimits[PlaneIndex.iSu_33] = {25.0, 106.0}

CameraViewAngleLimits[PlaneIndex.iSu_25] = {25.0, 106.0}

CameraViewAngleLimits[PlaneIndex.iSu_39] = {35.0, 120.0}

CameraViewAngleLimits[PlaneIndex.iMiG_29] = {25.0, 107.0}

CameraViewAngleLimits[PlaneIndex.iMiG_29K] = {25.0, 120.0}

CameraViewAngleLimits[PlaneIndex.iA_10] = {25.0, 80.0}

CameraViewAngleLimits[PlaneIndex.iF_15] = {25.0, 89.0}

function GetCameraViewAngleLimits(iType)

local p = CameraViewAngleLimits[iType]

return p[1], p[2]

end

 

function SetCameraViewAngleLimits(iType, viewAngMin, viewAngMax)

local p = CameraViewAngleLimits[iType]

p[1] = viewAngMin

p[2] = viewAngMax

end

 

 

-- HUD displacement for the HUD-only view (for cockpit builders).

-- Y-axis - up/down, Z-axis - left/right, in meters. X-axis (size) not implemented yet.

HUDOnlyPoint = {}

HUDOnlyPoint[PlaneIndex.iSu_27] = {0.0, 0.0, 0.0}

HUDOnlyPoint[PlaneIndex.iSu_33] = {0.0, 0.0, 0.0}

HUDOnlyPoint[PlaneIndex.iSu_25] = {0.0, 0.0, 0.0}

HUDOnlyPoint[PlaneIndex.iSu_39] = {0.0, 0.0, 0.0}

HUDOnlyPoint[PlaneIndex.iMiG_29] = {0.0, 0.0, 0.0}

HUDOnlyPoint[PlaneIndex.iMiG_29K] = {0.0, 0.0, 0.0}

HUDOnlyPoint[PlaneIndex.iA_10] = {0.0, 0.0, 0.0}

HUDOnlyPoint[PlaneIndex.iF_15] = {0.0, 0.0, 0.0}

 

function GetHUDOnlyPoint(iType)

local p = HUDOnlyPoint[iType]

return p[1], p[2], p[3]

end

 

-- HUD RGB color

HUDColor = {}

HUDColor[PlaneIndex.iSu_27] = {70, 255, 160}

HUDColor[PlaneIndex.iSu_33] = {70, 255, 160}

HUDColor[PlaneIndex.iSu_25] = {255, 255, 70}

HUDColor[PlaneIndex.iSu_39] = {70, 255, 160}

HUDColor[PlaneIndex.iMiG_29] = {70, 255, 160}

HUDColor[PlaneIndex.iMiG_29K] = {70, 255, 160}

HUDColor[PlaneIndex.iA_10] = {70, 255, 160}

HUDColor[PlaneIndex.iF_15] = {70, 255, 160}

 

function GetHUDColor(iType)

local p = HUDColor[iType]

return p[1], p[2], p[3]

end

 

function NaturalHeadMoving(tang, roll, omz)

local r = roll

if r > 90.0 then

r = 180.0 - r

elseif roll < -90.0 then

r = -180.0 - r

end

local hAngle = -0.25 * r

local vAngle = math.min(math.max(0.0, 0.4 * tang + 45.0 * omz), 90.0)

return hAngle, vAngle

end

 

ExternalMouse = true

ExternalMouseSpeedSlow = 1.0

ExternalMouseSpeedNormal = 5.0

ExternalMouseSpeedFast = 20.0

ExternalViewAngleMin = 3.0

ExternalViewAngleMax = 170.0

ExternalViewAngleDefault = 60.0

ExternalKeyboardZoomAcceleration = 30.0

ExternalKeyboardZoomAccelerateTimeMax = 1.0

ExplosionExpoTime = 1.0

ExternalKeyboardAccelerationSlow = 1.0

ExternalKeyboardAccelerationNormal = 10.0

ExternalKeyboardAccelerationFast = 30.0

ExternalHAngleAccelerateTimeMax = 3.0

ExternalVAngleAccelerateTimeMax = 3.0

ExternalDistAccelerateTimeMax = 3.0

ExternalHAngleLocalAccelerateTimeMax = 3.0

ExternalVAngleLocalAccelerateTimeMax = 3.0

ExternalAngleNormalDiscreteStep = 15.0/ExternalKeyboardAccelerationNormal -- When 'S' is pressed only

ChaseCameraNyMove = true

 

-- CameraJiggle() and CameraFloat() functions make camera position

-- dependent on FPS so be careful in using the Shift-J command with tracks, please.

function CameraJiggle(t)

local rotX, rotY, rotZ

rotX = 0.05 * math.random() * math.sin(37.0 * (t - 0.0))

rotY = 0.05 * math.random() * math.sin(41.0 * (t - 1.0))

rotZ = 0.05 * math.random() * math.sin(53.0 * (t - 2.0))

return rotX, rotY, rotZ

end

 

function CameraFloat(t)

local dX, dY, dZ

dX = 0.61 * math.sin(0.7 * t) + 0.047 * math.sin(1.6 * t);

dY = 0.43 * math.sin(0.6 * t) + 0.067 * math.sin(1.7 * t);

dZ = 0.53 * math.sin(1.0 * t) + 0.083 * math.sin(1.9 * t);

return dX, dY, dZ

end

EDIT: what Ruggbutt said.

Link to comment
Share on other sites

As always my head is spinning between all these view.lua, view.cfg, server.lua etc. scripts :rolleyes: hard to keep the overview, maybe you were confused as well? ;) I also have these values in the view.lua after all, with 1.12 - if you don't, it sounds like something's wrong with the installation...

 

 

THANKSSSSSS!!!!!!!

 

 

Like you say,..., must be an isnstalation problem.

 

My view.lua after install the 1.12 was like you can see in my first post.

 

So something goes wrong in the instalation. I have a copy of the old view.lua and i copy and paste the values. Now it works,....

 

:)

 

I'm happy (and is inquietant to think what more can go bad in the instalation)

 

:)

 

Thanks too to you Ruggbutt,..., so clear...

Link to comment
Share on other sites

Mmmmmm......i've just done another completely clean install Lock On/FC (CD version)/1.12 patch and this is my 'view.lua'......

 

-- View scripts

-- Copyright © 2004, Eagle Dynamics.

 

-- Don't change existing values, they are requested from Ñ++!

-- Use these indices in Snap and CockpitLocalPoint tables.

PlaneIndex = {

iSu_27 = 1,

iSu_33 = 2,

iSu_25 = 3,

iSu_39 = 4, -- Su-39 or Su-25T

iMiG_29 = 5,

iMiG_29K = 6,

iA_10 = 7,

iF_15 = 8,

}

 

CockpitMouse = false

CockpitMouseSpeedSlow = 1.0

CockpitMouseSpeedNormal = 10.0

CockpitMouseSpeedFast = 20.0

CockpitKeyboardAccelerationSlow = 5.0

CockpitKeyboardAccelerationNormal = 30.0

CockpitKeyboardAccelerationFast = 80.0

CockpitKeyboardZoomAcceleration = 300.0

DisableSnapViewsSaving = true

UseDefaultSnapViews = false

CockpitPanStepHor = 45.0

CockpitPanStepVert = 30.0

CockpitNyMove = true

CockpitHAngleOrigin = 0.0 -- Obsolete. Use SnapViews.lua, please.

CockpitVAngleOrigin = -9.5 -- Obsolete. Use SnapViews.lua, please.

CockpitHAngleAccelerateTimeMax = 0.15

CockpitVAngleAccelerateTimeMax = 0.15

CockpitZoomAccelerateTimeMax = 0.2

 

function GetSnapAngles(iPlane, iKey)

local s = Snap[iPlane][iKey]

return s.hAngle, s.vAngle, s.viewAngle

end

 

function SetSnapAngles(iPlane, iKey, hAngle, vAngle, viewAngle)

local s = Snap[iPlane][iKey]

s.hAngle = hAngle

s.vAngle = vAngle

s.viewAngle = viewAngle

end

 

function WriteSnapViews(fileName)

local file = io.open(fileName, "w")

if file then

io.output(file)

local t = {}

Serialize("Snap", Snap, t)

io.close(file)

end

end

 

-- Camera view angle limits {view angle min, view angle max}.

CameraViewAngleLimits = {}

CameraViewAngleLimits[PlaneIndex.iSu_27] = {20.0, 120.0}

CameraViewAngleLimits[PlaneIndex.iSu_33] = {20.0, 120.0}

CameraViewAngleLimits[PlaneIndex.iSu_25] = {20.0, 120.0}

CameraViewAngleLimits[PlaneIndex.iSu_39] = {20.0, 120.0}

CameraViewAngleLimits[PlaneIndex.iMiG_29] = {20.0, 120.0}

CameraViewAngleLimits[PlaneIndex.iMiG_29K] = {20.0, 120.0}

CameraViewAngleLimits[PlaneIndex.iA_10] = {20.0, 120.0}

CameraViewAngleLimits[PlaneIndex.iF_15] = {20.0, 120.0}

 

function GetCameraViewAngleLimits(iType)

local p = CameraViewAngleLimits[iType]

return p[1], p[2]

end

 

function SetCameraViewAngleLimits(iType, viewAngMin, viewAngMax)

local p = CameraViewAngleLimits[iType]

p[1] = viewAngMin

p[2] = viewAngMax

end

 

 

-- HUD displacement for the HUD-only view (for cockpit builders).

-- Y-axis - up/down, Z-axis - left/right, in meters. X-axis (size) not implemented yet.

HUDOnlyPoint = {}

HUDOnlyPoint[PlaneIndex.iSu_27] = {0.0, 0.0, 0.0}

HUDOnlyPoint[PlaneIndex.iSu_33] = {0.0, 0.0, 0.0}

HUDOnlyPoint[PlaneIndex.iSu_25] = {0.0, 0.0, 0.0}

HUDOnlyPoint[PlaneIndex.iSu_39] = {0.0, 0.0, 0.0}

HUDOnlyPoint[PlaneIndex.iMiG_29] = {0.0, 0.0, 0.0}

HUDOnlyPoint[PlaneIndex.iMiG_29K] = {0.0, 0.0, 0.0}

HUDOnlyPoint[PlaneIndex.iA_10] = {0.0, 0.0, 0.0}

HUDOnlyPoint[PlaneIndex.iF_15] = {0.0, 0.0, 0.0}

 

function GetHUDOnlyPoint(iType)

local p = HUDOnlyPoint[iType]

return p[1], p[2], p[3]

end

 

-- HUD RGB color

HUDColor = {}

HUDColor[PlaneIndex.iSu_27] = {0, 255, 0}

HUDColor[PlaneIndex.iSu_33] = {0, 255, 0}

HUDColor[PlaneIndex.iSu_25] = {255, 255, 0}

HUDColor[PlaneIndex.iSu_39] = {0, 255, 0}

HUDColor[PlaneIndex.iMiG_29] = {0, 255, 0}

HUDColor[PlaneIndex.iMiG_29K] = {0, 255, 0}

HUDColor[PlaneIndex.iA_10] = {0, 255, 0}

HUDColor[PlaneIndex.iF_15] = {0, 255, 0}

 

function GetHUDColor(iType)

local p = HUDColor[iType]

return p[1], p[2], p[3]

end

 

function NaturalHeadMoving(tang, roll, omz)

local r = roll

if r > 90.0 then

r = 180.0 - r

elseif roll < -90.0 then

r = -180.0 - r

end

local hAngle = -0.25 * r

local vAngle = math.min(math.max(0.0, 0.4 * tang + 45.0 * omz), 90.0)

return hAngle, vAngle

end

 

ExternalMouse = true

ExternalMouseSpeedSlow = 1.0

ExternalMouseSpeedNormal = 5.0

ExternalMouseSpeedFast = 20.0

ExternalViewAngleMin = 3.0

ExternalViewAngleMax = 170.0

ExternalViewAngleDefault = 60.0

ExternalKeyboardZoomAcceleration = 30.0

ExternalKeyboardZoomAccelerateTimeMax = 1.0

ExplosionExpoTime = 4.0

ExternalKeyboardAccelerationSlow = 1.0

ExternalKeyboardAccelerationNormal = 10.0

ExternalKeyboardAccelerationFast = 30.0

ExternalHAngleAccelerateTimeMax = 3.0

ExternalVAngleAccelerateTimeMax = 3.0

ExternalDistAccelerateTimeMax = 3.0

ExternalHAngleLocalAccelerateTimeMax = 3.0

ExternalVAngleLocalAccelerateTimeMax = 3.0

ExternalAngleNormalDiscreteStep = 15.0/ExternalKeyboardAccelerationNormal -- When 'S' is pressed only

ChaseCameraNyMove = true

 

-- CameraJiggle() and CameraFloat() functions make camera position

-- dependent on FPS so be careful in using the Shift-J command with tracks, please.

function CameraJiggle(t)

local rotX, rotY, rotZ

rotX = 0.05 * math.random() * math.sin(37.0 * (t - 0.0))

rotY = 0.05 * math.random() * math.sin(41.0 * (t - 1.0))

rotZ = 0.05 * math.random() * math.sin(53.0 * (t - 2.0))

return rotX, rotY, rotZ

end

 

function CameraFloat(t)

local dX, dY, dZ

dX = 0.61 * math.sin(0.7 * t) + 0.047 * math.sin(1.6 * t);

dY = 0.43 * math.sin(0.6 * t) + 0.067 * math.sin(1.7 * t);

dZ = 0.53 * math.sin(1.0 * t) + 0.083 * math.sin(1.9 * t);

return dX, dY, dZ

end

No third 'CameraViewAngleLimits' value.

 

What's going on ?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...