Jump to content

BUG - Petrovich UI sight still in center between my two monitors side by side setup


Recommended Posts

This is a post to cover two distinct issues with using Mi-24P on a multi-monitor system.

 

1. Glitch with 9K113_CAM_base_page.lua

Due to a little glitch in 9K113_CAM_base_page.lua 9K113 sight is not drawn in "CENTER" viewpoint by default, but instead positions in the middle of "LockOn_Options.screen.width / height", which is incorrect as it's drawn all over the monitors. 4 lines of code in to fix it, 2 in the beginning and 2 closer to the end:

 

HUD_OnlyX	   = SZX / 100.0
HUD_OnlyY 	   = SZY / 100.0
-- HUD_OnlyX	   = LockOn_Options.screen.width / 100.0 -- 6.0
-- HUD_OnlyY 	   = LockOn_Options.screen.height / 100.0 --6.0

SZX and SZY are already pre-calculated, but then not used in script

 

later following lines need to be fixed:

if LockOn_Options.screen.oculus_rift then
	screen_aspect = aspect
	kX = 2/SZX*screen_aspect;
	kY = 2/SZY;
else
	screen_aspect = SZX/SZY
	kX = 2/SZX*screen_aspect;
	kY = 2/SZY;
end

 

I have made a fix to 9K113_CAM_base_page.lua and now it works as intended, you can check the script yourself:

https://www.digitalcombatsimulator.com/en/files/3317185/

 

raduga_sight1.jpg

 

***

2. Petrovich UI

Additionally, there are also problems with Petrovich UI, the compass and crosshair are not positioned properly by default if user has more than 1 monitor. Crosshair for example is moved to the middle of "LockOn_Options.screen.width / height" as well, so can be on a side monitor or elsewhere. There probably should be a more elegant solution, but I just moved all the positional variables to the top of the file, so it's easier to adjust it manually:

https://www.digitalcombatsimulator.com/en/files/3317186/

 

Example of how script allow you to position Petrovich compass, and fixed crosshair which is now in the middle of the screen, and not at the border as by default with such config:

photo_2021-06-26_20-38-08.jpg

 

Would be nice to see a centralized solution to such issues in upcoming patches!

 

Thank you guys for an awesome new module! Mi-24P Rocks!!!


Edited by Mnemonic
  • Like 2
Link to comment
Share on other sites

  • Mnemonic changed the title to Multimonitor problems (and solutions) with 9K113 sight and Petrovich UI

Picture is a little blurry...also the window with autopilot channels is nowhere to be seen.. By checking this post  

  i tried to move petrovich ui screen to the middle of my left 1920*1080 screen but i cant get the numbers right  (For the crosshair, default {0,0} would be in the middle of the full DCS window, so if you want to shift it to the left decrease x into negatives) I tried but cant get it to the center of my screen

image.png


Edited by hreich

[sIGPIC][/sIGPIC]

Pilot from Croatia

Link to comment
Share on other sites

  • hreich changed the title to BUG - Petrovich UI sight still in center between my two monitors side by side setup
  • 1 year later...
On 6/28/2021 at 4:06 PM, Mnemonic said:

This is a post to cover two distinct issues with using Mi-24P on a multi-monitor system.

 

1. Glitch with 9K113_CAM_base_page.lua

Due to a little glitch in 9K113_CAM_base_page.lua 9K113 sight is not drawn in "CENTER" viewpoint by default, but instead positions in the middle of "LockOn_Options.screen.width / height", which is incorrect as it's drawn all over the monitors. 4 lines of code in to fix it, 2 in the beginning and 2 closer to the end:

 

HUD_OnlyX	   = SZX / 100.0
HUD_OnlyY 	   = SZY / 100.0
-- HUD_OnlyX	   = LockOn_Options.screen.width / 100.0 -- 6.0
-- HUD_OnlyY 	   = LockOn_Options.screen.height / 100.0 --6.0

SZX and SZY are already pre-calculated, but then not used in script

 

later following lines need to be fixed:

if LockOn_Options.screen.oculus_rift then
	screen_aspect = aspect
	kX = 2/SZX*screen_aspect;
	kY = 2/SZY;
else
	screen_aspect = SZX/SZY
	kX = 2/SZX*screen_aspect;
	kY = 2/SZY;
end

 

I have made a fix to 9K113_CAM_base_page.lua and now it works as intended, you can check the script yourself:

https://www.digitalcombatsimulator.com/en/files/3317185/

 

raduga_sight1.jpg

 

***

2. Petrovich UI

Additionally, there are also problems with Petrovich UI, the compass and crosshair are not positioned properly by default if user has more than 1 monitor. Crosshair for example is moved to the middle of "LockOn_Options.screen.width / height" as well, so can be on a side monitor or elsewhere. There probably should be a more elegant solution, but I just moved all the positional variables to the top of the file, so it's easier to adjust it manually:

https://www.digitalcombatsimulator.com/en/files/3317186/

 

Example of how script allow you to position Petrovich compass, and fixed crosshair which is now in the middle of the screen, and not at the border as by default with such config:

photo_2021-06-26_20-38-08.jpg

 

Would be nice to see a centralized solution to such issues in upcoming patches!

 

Thank you guys for an awesome new module! Mi-24P Rocks!!!

 

tried your fix for the Petrovich HelperAI reticle 

But, I get a texture issue. Do I have a unique issue or have you made an update to the lua?

 

Untitled.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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