TRACKIR Closed window block solutions 1.38/1.39. Updated 29/01/2021

Make your game even better
Post Reply
User avatar
JHTrucker
Posts: 839
Joined: February 7th, 2020, 3:19 pm
Location: UK

TRACKIR Closed window block solutions 1.38/1.39. Updated 29/01/2021

Post by JHTrucker » April 27th, 2020, 3:42 pm

TRACKIR closed window block.
SCS don't want TIR users to test if having a window block is a good idea or not.
After 15+ years of sim racing, using my trackir 3, where the left/right view is restricted to simulate being strapped into a race car, i never even thought this restriction was an issue. But SCS do? After driving ETS2 for the last 7 years unrestricted, i can now enjoy having to open the windows to look out, without issues.

Note: This isn't a mod to just drop into your mod manager, you'll also need to follow instructions and edit your controls.sii file.

UPDATED 22/05/2020 - Option 7 added - Using g_cam_window_block.
The basic Options 2 to 6 archived on this post: viewtopic.php?p=19256#p19256
UPDATED 15/07/2020 - Option 7 updated to game version 1.38. You should re-read this post and apply all edits again.
UPDATED 26/07/2020 - Option 1 re-added and updated to game version 1.38.
UPDATED 16/09/2020 - Option 1 updated: viewtopic.php?p=25876#p25876
UPDATED 29/09/2020 - Option 1 updated: viewtopic.php?p=25876#p25876
UPDATED 25/10/2020 - Option 1 updated - Added Manual "basic" window operation as an alternative to the automated setup. viewtopic.php?p=25876#p25876
UPDATED 28/10/2020 - Option 1 updated: viewtopic.php?p=25876#p25876
UPDATED 19/11/2020 - Option 1 updated: viewtopic.php?p=25876#p25876
UPDATED 20/11/2020 - Option 7 updated: New menu mod 1.39 - Lines 72, 187 & 254 amended. What's changed? Look here: viewtopic.php?p=31553#p31553
UPDATED 25/11/2020 - Option 1 & 7 updated - New menu mod, Line 59 added and Line 187 amended. What's changed? Look here: viewtopic.php?p=31760#p31760
UPDATED 12/12/2020 - Option 1 updated: viewtopic.php?p=32529#p32529
UPDATED 14/12/2020 - Option 7 updated: Lines 57 & 60 added and line 128 amended. New menu mod v3. What's changed? Look here: viewtopic.php?p=32631#p32631
UPDATED 21/12/2020 - Option 1 updated: viewtopic.php?p=25876#p25876
UPDATED 29/01/2021 - Option 1 updated: viewtopic.php?p=25876#p25876

Option 1 "The Best": (works with ATS & ETS2 1.38 & 1.39).
This is for a more realistic sim experience. Unlike Option 7, full TIR control inside and outside, g_cam_window_block, isn't used or required. Your head doesn't stop at the window, you can turn your head inside the cab up to 180 degrees left/right while the window is closed.
Option 1 can be found on this link: viewtopic.php?p=25876#p25876

Option 7: (works with ATS & ETS2 1.38 & 1.39).
NOTE: This update won't work on game versions below 1.38!
Option 7 for game version 1.37 is archived below the 1.38/1.39 setup, if you still want it.


How option 7 works.
TIR controls the internal view as normal. Perfect.
At the point of the drivers window TIR is disabled. Mouse/game controller function takes over and g_cam is used to check for block or not.
Once head is out of the open window you are controlling the game controller function with your head, your real head is looking left so the view auto rotates left. You can't look right without jumping back into the cab/drivers window area, because you are still looking left with your real head. You can't control the outside view.
For me, i only stick my head out of the window to view the rear of the trailer when reversing, if required, so that's exactly the view i get. You can't put your head through a closed window.

1.38+ update: If you require TIR control for the outside view, then you can now activate it "on demand".
Once the driver window is open you should then turn your real head far left to look along your truck/trailer (matching the auto rotated view) and then press the "driver window open button" (the window is already fully open anyway), this will trigger unblocking, now let go of the "driver window open button" and you'll have TIR control inside and outside whilst the window is open. Once you press "driver window close button", your head will once again be trapped inside the cab. Works the opposite for RHD trucks.

Note: look far left (for LHD) or look far right (for RHD) whilst a quick press of the "driver window open button" is designed to prevent accidentially triggering the unblock when windows are closed and you are quickly looking left/right at a junction, for example. You don't keep pressing the open window button once unblocked.

So that sounds good, but it isn't perfect, you can cheat, you can just turn your head to the window without opening it and do the unblock sequence, your head will then pass through the opening window. So, don't cheat, otherwise what was the point of having a block? Pressing "driver window close button" will always block you again.
We can only initiate game functions, open window for example, but we get no feedback from the game to say the window is actually fully open. Therefore this requires a degree of user compliance. Remember, TIR doesn't work with g_cam_window_block, so turning TIR off is the only way to check if your head can pass through the window or not and we can't control it then.

Extra note: The following situations will cause the window blocking to fail, but pressing "driver window close button" will always fix this:-
When the window is fully open and TIR outside control has been activated:
If you then change trucks, the new truck will have windows closed by default, your head will pass through them. Press "driver window close button" to fix.
If you then upgrade your truck, you get it back with windows closed by default, your head will pass through them. Press "driver window close button" to fix.
If you then load a save that had the windows closed, your head will pass through them. Press "driver window close button" to fix.
They maybe other such situations. Just press "driver window close button" to fix them.
But if you don't activate TIR outside control first, then there shouldn't be any issues.

Whilst otherwise driving around normally, operating the windows, there should be no issues in regard to head passing through a closed window.

The game will always start with the following setup regardless of how you left it the last time you played (SCS forced defaults that i can't change).
Head Tracking On - But that's a good thing.
Window blocked regardless of it's open or closed state - Just open or close window to fix.

Note: As with mouse users, using g_cam_window_block, we can now also hear external sounds at the point where the block exists.
Here is my explanation to why this happens: viewtopic.php?p=22955#p22955 and probably won't be fixed by SCS. Hope i'm wrong.

You need to use the attached menu mod to make changes whilst in game.
Note: This is a modded Tobii Eye menu so ignore the balloon tips.
The Menu mod is in English only and consists of:-

Head Tracking - Enable / Disable - Mouse only when disabled.
This allow you to turn off head tracking whilst in game, if required only.

Window blocking for LHD Truck (Untick) or for RHD Truck (Tick).
Set this to suit your current truck, so window block works correctly.

Window block point fine adjustment if required - Default 0.00
This slider is useful depending on what truck your are driving.
Basically, you can reduce the gap between TIR off and controller function auto rotating to the closed window.
But don't feel you have to change from the default value to enjoy having your head blocked.

Outside TrackIR Control 'On Demand' activation options: ***New 14/12/2020***
1 - Look Far Left (LHD) / Right (RHD) & Press Open Drivers Window Button.
2 - Look Far Left (LHD) / Right (RHD) & Look Up.
Look Far Left (LHD) / Right (RHD) Trigger Point - Default 4.5
Look Up Trigger Point - Default 3.0 - Disable 0.0

How far you can move towards passenger side (TIR x) - Default 0% ***Amended 20/11/2020***
Move sideways slider increases up to 100% but only to the passenger side.
As long as LHD/RHD above is set correctly then you won't slide out of the door.
0% = disabled - 10% = game standard sideways movement.

Trigger 'Zoom View' when leaning forward (TIR z) - Default 9.0 ***Amended 20/11/2020***
As standard, when you lean forward you get closer to the dash.
This adds to that feature by allowing you to lean further forward and thereby trigger the in game zoom.
Set the slider to 0.0 to disable. The lower the value the sooner zoom will be triggered.
Feels right to lean forward to read up coming signs. One less button to press!
The zoom feature in game doesn't work with multimon_config.sii files with fixed FOV values, it therefore means this function will also not work with that setup.

Zoom Zone - Default 0.55 ***New 25/11/2020***
This allows you to set the area to the left & right that "triggering zoom view" is active to prevent unwanted head zoom at higher head angles.
5.00 = Up to 180 degrees left/right (head zoom always on).
2.5 = Up to 90 degrees left/right.
1.25 = Up to 45 degrees left/right (prevent head zoom when looking around at junctions etc).
0.55 = Up to 20 degrees left/right - Default - (good for head zooming to just read upcoming signs in front of you).

Reset Head Tracking - Re-centers your in game head.
Existing game function shown here for completeness.

Previous downloads: 60
***New 14/12/2020***
TIR Option 7 Window Block Menu 1.39v3.zip
(17.01 KiB) Downloaded 35 times
Press SHIFT + NUMLOCK to access menu mod to make changes as required.
Press ESCAPE to go back to driving screen.

These are the option 7 file edits that are required along with the menu mod:
Note: If you have used one of my other "head blocking options" you should reset the modified lines in your controls.sii file with the game default ones, associated with that option, that i display at the bottom of each "head blocking post" before editing your file with these changes.

Edit with notepad/wordpad etc your config_local.cfg file, like so:

American/Euro Truck Simulator\profiles\Your Profile\config_local.cfg
uset g_cam_window_block "0.0" <-- change to 1.0 (must be 1.0 to work properly).
That will block your head at the window until the window is fully open.

Make a backup copy of controls.sii for safe keeping, just in case.

If you've previously used one of my options (1 to 5) then you need to reset one of the lines that they modified.
Edit controls.sii file with notepad/wordpad etc, like so:

Replace this line:
config_lines[244(1.37) or 251(1.38)]: "mix headtryaw `clamp(sel(trackiron, trackiryaw, 0), -1.45... ***different edits per options 1-5***
With the original line:
config_lines[251]: "mix headtryaw `sel(trackiron, trackiryaw, 0) + sel(hmdon, hmdyaw, 0) + sel(eyeposon, eyeposyaw, 0)`"

Set these values as my option 7 defaults:
config_lines[52]: "constant c_ht_on 1.000000"
config_lines[54]: "constant c_et_head 1.000000"
config_lines[55]: "constant c_et_pos 0.000000"
config_lines[56]: "constant c_et_yawsc 0.000000"
config_lines[57]: "constant c_et_pitchsc 4.500000" ***New 14/12/2020***
config_lines[59]: "constant c_etwm_yawsc 0.550000" ***New 25/11/2020***
config_lines[60]: "constant c_etwm_pitsc 3.000000" ***New 14/12/2020***
config_lines[65]: "constant c_et_hv_res 0.000000"
config_lines[72]: "constant c_et_hv_sc 0.900000" ***Amended 20/11/2020***

Now make these option 7 line edits:

Replace this line:
config_lines[128]: "mix headtren ``"
With this line: ***Amended 14/12/2020***
config_lines[128]: "mix headtren `c_et_head & trackir.device.active?0 * ((lwinclose?0 * abs(sign(trackir.device.position.yaw?0 + 2)) * ! c_et_pos * ! c_ht_on) + (rwinclose?0 * abs(sign(trackir.device.position.yaw?0 + 2)) * c_et_pos * ! c_ht_on) + ((lwinopen?0 * sign(deadzone(trackir.device.position.yaw?0, (0.725 + (c_et_pitchsc * 0.05)))) * ! c_et_pos * c_ht_on) + (rwinopen?0 * sign(deadzone(-trackir.device.position.yaw?0, (0.725 + (c_et_pitchsc * 0.05)))) * c_et_pos * c_ht_on)) + (((sign(deadzone(trackir.device.position.yaw?0, (0.725 + (c_et_pitchsc * 0.05)))) * abs(sign(deadzone(trackir.device.position.pitch?0, (c_etwm_pitsc * 0.1)))) * ! c_et_pos * c_ht_on) + (sign(deadzone(-trackir.device.position.yaw?0, (0.725 + (c_et_pitchsc * 0.05)))) * abs(sign(deadzone(trackir.device.position.pitch?0, (c_etwm_pitsc * 0.1)))) * c_et_pos * c_ht_on)) * sign(c_etwm_pitsc)))`"

Replace this line: (Zoom view with your head rather than a button).
config_lines[187]: "mix camzoom `joy.b22?0 | semantical.camzoom?0`"
With this line: ***Amended 25/11/2020***
config_lines[187]: "mix camzoom `sign(clamp(deadzone(-trackir.device.position.z?0 , c_et_hv_sc * 0.95), -0.0, 1.0)) * ! cam5 * trackiron * sign(c_et_hv_sc) * ! sign(abs(deadzone(trackiryaw, (c_etwm_yawsc / 5))))`"

Replace this line:
config_lines[201]: "mix looklranaraw `deadzone(-sel(c_jilooklr, -j_look_lr?0, j_look_lr?0), c_lr_dz)`"
With this line:
config_lines[201]: "mix looklranaraw `deadzone(sel(trackiron, trackiryaw, 0), 0.5)`"

Replace this line:
config_lines[204]: "mix looklranaspd `looklranaraw * c_jrspeed`"
With this line:
config_lines[204]: "mix looklranaspd `looklranaraw * pow(trackiryaw,4) * 8`"

Replace this line:
config_lines[218]: "mix trackiron `trackir.device.active?0`"
With this line:
config_lines[218]: "mix trackiron `c_et_head & trackir.device.active?0`"

Replace this line:
config_lines[250]: "mix headtron `c_ht_on & (trackiron | hmdon | eyeposon)`"
With this line:
config_lines[250]: "mix headtron `sign(trackiron) * sign(c_et_head) * ((trackiryaw / 2.5) + ((0.3 - c_et_yawsc / 100) - (sign(c_et_pos) * (0.3 - c_et_yawsc / 100) * 2)) + sign(trackiron)) - ((trackiryaw / 2.5) + ((0.3 - c_et_yawsc / 100)-(sign(c_et_pos) * (0.3 - c_et_yawsc / 100) * 2)) + sign(trackiron)) * abs(sign(c_ht_on - 1)) + abs(sign(c_ht_on - 1)) * sign(trackiron) * sign(c_et_head)`"

Replace this line:
config_lines[254]: "mix headtrx `clamp(sel(trackiron, trackirx, 0) + sel(eyeposon, eyeposx, 0), -0.1, 0.1) + sel(hmdon, hmdx, 0)`"
With this line: ***Amended 20/11/2020***
config_lines[254]: "mix headtrx `(clamp(trackirx, -clamp(c_et_hv_res, -0.0, 0.1), c_et_hv_res) * ! c_et_pos) + (clamp(trackirx, -c_et_hv_res, clamp(c_et_hv_res, -0.0, 0.1)) * c_et_pos)`"

Replace this line:
config_lines[257]: "mix headtrwmon `c_ht_on & (trackiron | hmdon | eyeposon)`"
With this line:
config_lines[257]: "mix headtrwmon ``"

If you want to have both windows open and close together using only the left open/close window buttons, then do this:
Replace this line:
config_lines[306]: "mix rwinopen `semantical.rwinopen?0`"
With this line:
config_lines[306]: "mix rwinopen `(abs(sign(trackir.device.position.yaw?0 + 2)) * lwinopen?0)`"

And replace this line:
config_lines[307]: "mix rwinclose `semantical.rwinclose?0`"
With this line:
config_lines[307]: "mix rwinclose `(abs(sign(trackir.device.position.yaw?0 + 2)) * lwinclose?0)`"

Then just assign buttons in game for open/close left window only, otherwise assign both windows buttons in game as normal.

Close and save.

Start game and see how it works.

If it doesn't work, open the console, if you see one of the above lines in red text, you need to check that line again for a typo or a bad copy/paste.

Press SHIFT + NUMLOCK to access menu mod to make changes as required.
Press ESCAPE to go back to driving screen.

NOTE: Don't change any key bindings in the game menu's that state "COMPLEX".
The above edits are the reason those are "complex".


===============================================================================================


Game controls.sii file defaults 1.38 & 1.39 - 14/12/2020: - Reset to these lines if using VR or Tobii instead.
Or If you mess up the file, just delete it, the game will generate a new one that you can then add your keys to again.
config_lines[52]: "constant c_ht_on 1.000000"
config_lines[54]: "constant c_et_head 1.000000"
config_lines[55]: "constant c_et_pos 0.000000"
config_lines[56]: "constant c_et_yawsc 1.000000"
config_lines[57]: "constant c_et_pitchsc 1.000000"
config_lines[59]: "constant c_etwm_yawsc 1.000000"
config_lines[60]: "constant c_etwm_pitsc 1.000000"
config_lines[65]: "constant c_et_hv_res 1.000000"
config_lines[72]: "constant c_et_hv_sc 0.750000"
config_lines[128]: "mix headtren ``"
config_lines[187]: "mix camzoom `semantical.camzoom?0`"
config_lines[201]: "mix looklranaraw `deadzone(-sel(c_jilooklr, -j_look_lr?0, j_look_lr?0), c_lr_dz)`"
config_lines[204]: "mix looklranaspd `looklranaraw * c_jrspeed`"
config_lines[218]: "mix trackiron `trackir.device.active?0`"
config_lines[250]: "mix headtron `c_ht_on & (trackiron | hmdon | eyeposon)`"
config_lines[251]: "mix headtryaw `sel(trackiron, trackiryaw, 0) + sel(hmdon, hmdyaw, 0) + sel(eyeposon, eyeposyaw, 0)`"
config_lines[254]: "mix headtrx `clamp(sel(trackiron, trackirx, 0) + sel(eyeposon, eyeposx, 0), -0.1, 0.1) + sel(hmdon, hmdx, 0)`"
config_lines[257]: "mix headtrwmon `c_ht_on & (trackiron | hmdon | eyeposon)`"


===============================================================================================

Archived game version 1.37

UPDATED 27/05/2020 - Line 243 amended. Explanation here: viewtopic.php?p=22697#p22697
UPDATED 29/05/2020 - Line 243 now optional LHD or RHD
UPDATED 05/06/2020 - Line 197 amended. Explanation here: viewtopic.php?p=23517#p23517
UPDATED 17/06/2020 - Line 194 & 243 amended and line 250 added. Explanation here: viewtopic.php?p=24333#p24333
UPDATED 27/06/2020 - Line 194 amended & Option 7 advanced edits added.

Option 7: (works with ATS/ETS2 1.37 - 22/05/2020).
You can't put your head through a closed window. No need to press & hold anything or setup key recording / timing like my previous options. Just open window(s) as required.

How option 7 works.

TIR controls the internal view as normal. Perfect.
At the point of the drivers window TIR is disabled. Mouse/game controller function takes over and g_cam is used to check for block or not.
Once head is out of the window you are controlling the game controller function with your head, your real head is looking left so the view rotates left.
You can't look right without jumping back into the cab/drivers window area, because you are still looking left with your real head.
For me, i only stick my head out of the window to view the rear of the trailer when reversing (if required) so that's exactly the view i get.
Here's a better explanation, if you need it: viewtopic.php?p=24040#p24040

Pic attached below to illustrate this:
Pic 1: Default scs & option 7 TIR controlled view.
Pic 2: Default scs & option 7 TIR controlled view.
Pic 3: Default scs TIR controlled view that passes through an open or closed window.
Pic 3: Option 7 view, auto rotates to left limit once head is out of the open window, no TIR control.
tir option 7.png
Some questions to ask yourself:
Do i want to drive like in real life where the majority of the time my head is inside the cab?
Do i need TIR controlled outside view?
What would i gain from changing the view to somewhere between pic 2 & pic 3?

Remember, we've had 7+ years of freely moving our TIR controlled head where we want, totally unrestricted, thereby forgetting that the window exists.
You should at least try option 7 by driving around for some time with the windows closed or 25% or so open (to hear fmod sounds) to get a feel for having this new restriction to your head movement. If you don't like this new restriction, then the "small" limitation of non TIR controlled outside view isn't the issue you might think it is.

Note: As with mouse users, using g_cam_window_block, we can now also hear external sounds through a closed window at the point where the block exists.
Here is my explanation to why this happens: viewtopic.php?p=22955#p22955 and probably won't be fixed. Hope i'm wrong.

Option 7 edits:

Edit with notepad your config_local.cfg file, like so:

American/Euro Truck Simulator\profiles\Your Profile\config_local.cfg
uset g_cam_window_block "0.0" <-- change to 0.85
That will block your head at the window until the window is atleast 85% open.
Change to uset g_cam_window_block "1.0" if you'd rather the window was fully open.

Make a backup copy of controls.sii for safe keeping, just in case.

If you've previously used one of my options (1 to 5) then you need to reset two of the lines that they modified.
Edit controls.sii file with notepad, like so:

config_lines[53]: "constant c_et_head 0.000000" <-- change back to 1.000000

Replace this line:
config_lines[244]: "mix headtryaw `clamp(sel(trackiron, trackiryaw, 0), -1.45... ***different edits per options 1-5***
With the original line:
config_lines[244]: "mix headtryaw `sel(trackiron, trackiryaw, 0) + sel(hmdon, hmdyaw, 0) + sel(eyeposon, eyeposyaw, 0)`"

Now make these 4 option 7 line edits:

Replace this line:
config_lines[194]: "mix looklranaraw `deadzone(-sel(c_jilooklr, -j_look_lr?0, j_look_lr?0), c_lr_dz)`"
With this line:
config_lines[194]: "mix looklranaraw `deadzone(sel(trackiron, trackiryaw, 0), 0.5)`"

Replace this line:
config_lines[197]: "mix looklranaspd `looklranaraw * c_jrspeed`"
With this line:
config_lines[197]: "mix looklranaspd `looklranaraw * pow(trackiryaw,4) * 8`"

Pick 1 of the below 2 lines.
Replace this line:
config_lines[243]: "mix headtron `trackiron | hmdon | eyeposon`"
With this line (for LHD trucks):
config_lines[243]: "mix headtron `(trackiryaw / 2.5) + 0.30 + sign(trackiron)`"
OR
With this line (for RHD trucks):
config_lines[243]: "mix headtron `(trackiryaw / 2.5) - 0.30 + sign(trackiron)`"

Replace this line:
config_lines[250]: "mix headtrwmon `trackiron | hmdon | eyeposon`"
With this line:
config_lines[250]: "mix headtrwmon `0`"

Close and save.

Start game and see how it works.

If you want the look up & down movement when your head is out of the window (although not recommended), then edit like so:

Replace this line:
config_lines[195]: "mix lookudanaraw `deadzone(-sel(c_jilookud, -j_look_ud?0, j_look_ud?0), c_ud_dz)`"
With this line:
config_lines[195]: "mix lookudanaraw `deadzone(sel(trackiron, trackirpitch, 0), 0.01)`"

Replace this line:
config_lines[199]: "mix lookudspd `lookudanaraw * c_jrspeed`"
With this line:
config_lines[199]: "mix lookudspd `lookudanaraw * 3`"

Close and save.

Start game and see how it works. If you don't like it, just reverse the above 2 line changes to stop up & down once again.

Just to be clear, your controls.sii file should contain these lines for option 7 to work:
config_lines[194]: "mix looklranaraw `deadzone(sel(trackiron, trackiryaw, 0), 0.5)`"
config_lines[195]: "mix lookudanaraw `deadzone(sel(trackiron, trackirpitch, 0), 0.01)`" ***optional & not recommended***
config_lines[197]: "mix looklranaspd `looklranaraw * pow(trackiryaw,4) * 8`"
config_lines[199]: "mix lookudspd `lookudanaraw * 3`" ***optional & not recommended***
config_lines[243]: "mix headtron `(trackiryaw / 2.5) + 0.30 + sign(trackiron)`" <--- LHD TRUCKS ONLY
or
config_lines[243]: "mix headtron `(trackiryaw / 2.5) - 0.30 + sign(trackiron)`" <--- RHD TRUCKS ONLY
config_lines[244]: "mix headtryaw `sel(trackiron, trackiryaw, 0) + sel(hmdon, hmdyaw, 0) + sel(eyeposon, eyeposyaw, 0)`"
config_lines[250]: "mix headtrwmon `0`"

Option 7 advanced edits - 1.37 only and are optional:

The following are advanced settings to enhance the basic "option 7" above by incorporating extra line changes and a "TIR g_cam Menu 1.37" mod to give you in game changes rather than having to edit the controls.sii file all the time, if you change from LHD to RHD, for example.

Note: This is strictly game version 1.37 only, the mod will crash 1.38, i'll fix it when i get 1.38 after public release.

The Menu mod is in English only and consists of:-

Head Tracking - Enable / Disable - Mouse only when disabled.
This allow you to turn off head tracking whilst in game, if required only.

Window blocking for LHD Truck (Untick) or for RHD Truck (Tick).
Set this to suit your current truck, so window block works correctly.

Window block point fine adjustment if required - Default 0.00
This slider is useful depending on what truck your are driving.
But don't feel you have to change from the default value to enjoy having your head blocked.

Disable window blocking - Tick - (but why would you?).
When ticked, your head will pass through a closed window (SCS standard).
May be useful if your window is open and you want TIR control outside the cab.

Reset Head Tracking - Re-centers your in game head.
Existing game function shown here for completeness.

How far you can move towards passenger side (TIR x) - Default 0%
Move sideways slider increases up to 100% but only to the passenger side.
As long as LHD/RHD above is set correctly then you won't slide out of the door.
0% is game standard sideways movement.

Trigger 'Zoom View' when leaning forward (TIR z) - Default 1.3
As standard, when you lean forward you get closer to the dash.
This adds to that feature by allowing you to lean further forward and thereby trigger the in game zoom.
Set the slider to 0.0 to disable. The higher the value the sooner zoom will be triggered.
Feels right to lean forward to read up coming signs. One less button to press!
The zoom feature in game doesn't work with multimon_config.sii files with fixed FOV values, it therefore means this function will also not work with that setup.
TIR g_cam Menu 1.37.zip
(4.25 KiB) Downloaded 73 times
Along with the menu mod are these extra required additions and changes to your controls.sii file.
Set these values as my option 7 defaults:
config_lines[53]: "constant c_et_head 1.000000"
config_lines[54]: "constant c_et_pos 0.000000"
config_lines[55]: "constant c_et_yawsc 0.000000"
config_lines[64]: "constant c_et_hv_res 0.000000"
config_lines[71]: "constant c_et_hv_sc 0.130000"
config_lines[76]: "constant c_et_hv_ac 0.000000"

Replace this line: (I used wheel button joy.b22?0 to zoom before changing to this way)
config_lines[180]: "mix camzoom `joy.b22?0 | semantical.camzoom?0`"
With this line:
config_lines[180]: "mix camzoom `keyboard.lshift?0 & keyboard.z?0 | trackiron & -trackir.device.position.z?0 * (c_et_hv_sc * 10)`"

Replace this line:
config_lines[211]: "mix trackiron `trackir.device.active?0`"
With this line:
config_lines[211]: "mix trackiron `c_et_head & trackir.device.active?0`"

Replace this line:
config_lines[243]: "mix headtron `(trackiryaw / 2.5) + 0.30 + sign(trackiron)`"
With this line: (it's massive!!!, so be careful when you copy/paste)
config_lines[243]: "mix headtron `sign(trackiron)*sign(c_et_head)*((trackiryaw/2.5)+((0.3-c_et_yawsc/100)-(sign(c_et_hv_ac)*(0.3-c_et_yawsc/100)*2))+sign(trackiron))-((trackiryaw/2.5)+((0.3-c_et_yawsc/100)-(sign(c_et_hv_ac)*(0.3-c_et_yawsc/100)*2))+sign(trackiron))*sign(c_et_pos)+sign(c_et_pos)*sign(trackiron)*sign(c_et_head)`"

Replace this line:
config_lines[247]: "mix headtrx `clamp(sel(trackiron, trackirx, 0) + sel(eyeposon, eyeposx, 0), -0.1, 0.1) + sel(hmdon, hmdx, 0)`"
With this line:
config_lines[247]: "mix headtrx `clamp(sel(trackiron, trackirx, 0), -0.1 - 0.1 * c_et_hv_ac * c_et_hv_res * 10, 0.1 + c_et_hv_res - c_et_hv_res * c_et_hv_ac)`"

Close and save.

Start game and see how it works.
By default, TIR will be on, for LHD truck, window blocking & zoom feature.
In game Press SHIFT + NUMLOCK to access TIR g_cam Menu.
Press ESCAPE to go back to driving view.
Note: This menu is a modded Tobii Eye Menu, so you should ignore the balloon tips!

If it doesn't work, open the console, if you see one of the above lines you've just amended highlighted red then that line needs re-checking / typo / copy/paste again.

The menu mod is only required to make changes in game, so you can disable it once you are happy, if you need to.
If you like to drive LHD & RHD trucks then best to keep menu mod for easy change.

If, like me, you only use TIR yaw (look left/right) you can still use the zoom method by disabling in game "z" movement.
Enable "z" in your head tracking software.
Then do the following:

Replace this line:
config_lines[249]: "mix headtrz `clamp(sel(trackiron, trackirz, 0) + sel(eyeposon, eyeposz, 0), -0.2, 0.05) + sel(hmdon, hmdz, 0)`"
With this line:
config_lines[249]: "mix headtrz `clamp(sel(trackiron, trackirz, 0) + sel(eyeposon, eyeposz, 0), 0, 0) + sel(hmdon, hmdz, 0)`"

Your in game head won't move back and forward anymore but it will trigger zoom when you lean far enough forward.

===============================================================================================

Game controls.sii file defaults 1.37 - 22/05/2020: - Reset to these lines if using VR or Tobii instead.
Or If you mess up the file, just delete it, the game will generate a new one that you can then add your keys to again.
config_lines[53]: "constant c_et_head 1.000000"
config_lines[54]: "constant c_et_pos 0.000000"
config_lines[55]: "constant c_et_yawsc 1.000000"
config_lines[64]: "constant c_et_hv_res 1.000000"
config_lines[71]: "constant c_et_hv_sc 0.750000"
config_lines[76]: "constant c_et_hv_ac 0.000000"
config_lines[180]: "mix camzoom `semantical.camzoom?0`"
config_lines[194]: "mix looklranaraw `deadzone(-sel(c_jilooklr, -j_look_lr?0, j_look_lr?0), c_lr_dz)`"
config_lines[195]: "mix lookudanaraw `deadzone(-sel(c_jilookud, -j_look_ud?0, j_look_ud?0), c_ud_dz)`"
config_lines[197]: "mix looklranaspd `looklranaraw * c_jrspeed`"
config_lines[199]: "mix lookudspd `lookudanaraw * c_jrspeed`"
config_lines[211]: "mix trackiron `trackir.device.active?0`"
config_lines[243]: "mix headtron `trackiron | hmdon | eyeposon`"
config_lines[244]: "mix headtryaw `sel(trackiron, trackiryaw, 0) + sel(hmdon, hmdyaw, 0) + sel(eyeposon, eyeposyaw, 0)`"
config_lines[247]: "mix headtrx `clamp(sel(trackiron, trackirx, 0) + sel(eyeposon, eyeposx, 0), -0.1, 0.1) + sel(hmdon, hmdx, 0)`"
config_lines[249]: "mix headtrz `clamp(sel(trackiron, trackirz, 0) + sel(eyeposon, eyeposz, 0), -0.2, 0.05) + sel(hmdon, hmdz, 0)`"
config_lines[250]: "mix headtrwmon `trackiron | hmdon | eyeposon`"

===============================================================================================

Unrelated controls.sii file changes to enhance the trucking experience.
Moved to here: viewtopic.php?f=23&t=1825

===============================================================================================

ATS/ETS2 Additional non standard screen configurations to try for Single, Dual, Triple or Quad screen setups.
Link: viewtopic.php?p=20460#p20460
Last edited by JHTrucker on January 29th, 2021, 3:37 am, edited 238 times in total.
NPI AA: viewtopic.php?p=13049#p13049
TRACKIR closed window block: viewtopic.php?p=19250#p19250
Additional non standard screen configs: viewtopic.php?p=17658#p17658
User avatar
BenganJ
Moderator
Posts: 7980
Joined: December 15th, 2018, 11:54 am
Location: Gothenburg, Sweden

TRACKIR Open/Close window block (possible) solutions.

Post by BenganJ » April 27th, 2020, 3:58 pm

@JHTrucker

Finally all is happening in the same gorgeous cam view! Great mind you have! Thanks!
As far as I see it, the main problem is to find two keys or buttons to assign, which isn't
that easy. I have all mine on my G27 wheel + Shifter already assigned, gotta find a way
here. Once again, THANKS!

EDIT: DAMN, come to think about it, in ATS I already have the keyboard keys z (open) and
x (close) assigned to that function of opening both windows at the same time! :D
---------------------------------------------------------------------------------------------------------------------------------------------
System: Windows 8.1
Processor: Intel Core i7-4790@
Memory: 16GB
Graphics: ASUS GeForce GTX1660Ti
Image
User avatar
JHTrucker
Posts: 839
Joined: February 7th, 2020, 3:19 pm
Location: UK

TRACKIR Open/Close window block (possible) solutions.

Post by JHTrucker » April 27th, 2020, 4:10 pm

@BenganJ I have a usb number pad that i use as a button box next to wheel on the right. Shifter is on left and keyboard (out of reach) also.
Numpad has:
TIR on/off - Fuel
Lift drop truck - Lift drop trailer
Park brake - Diff lock

G27 Wheel left side:
TIR centre
Horn --> open windows***
Cruse control

G27 Wheel right side:
High beam
spare --> close windows***
Zoom

Flappy paddles are indicators.

Shifter:
Is start truck, wipers, lights, hitch up, advisor/map toggles, activate, hazard lights, beacon & world map.
So for me, who needs a horn? I then have two spare buttons on my wheel.

===============================================================================================

DON'T USE OPTION 1 HERE... Option 1 updated to 1.38 here: viewtopic.php?p=25876#p25876

Archived from first post - options 1 to 6
If you have time on your hands and enjoy reading stuff, then there's plenty to read here, but it's left available for your info only. Option 7 in the first post is currently the best solution.

Quick summary:
Options 1 to 5 default your in cab view to blocked at the window point. You then "unblock" to gain full movement as required.

Option 1 can be automated and works well in my test (but hardest to setup), see extensive write up!
You can't put your head through a closed window.
I use H shifter on my G27 and have to set "shifter layout behavior" to "simple + warning sounds" instead of "advanced" otherwise my gears change to neutral and grind every time the console pops open for a split second to change blocked or unblocked state.
Also, drag the bottom right corner of the console over to the left to reduce it's size to make it less distracting.

Option 2 for a basic "press and hold" unblock button.
Note: You can put your head through a closed window when using an unblock button.

Option 3 for a basic "press and hold" unblock button whilst opening windows.
Note: You can put your head through a closed window when using an unblock button.

Option 4 for a basic "press and hold" unblock buttons whilst opening windows and unblock when selecting reverse on H shifter.
Note: You can put your head through a closed window when using an unblock button.

Option 5 for a basic "press and hold" unblock buttons whilst opening windows and unblock when selecting reverse on H shifter.
Also unblock when "press and hold" both window buttons at the same time.
Note: You can put your head through a closed window when using an unblock button.

Option 6 - Self control.
When driving down the road, do you veer off and run along the grass because the game doesn't stop you from doing that? No because you have full control of the steering wheel and choose how to drive.
So why turn your head far enough to put it through a closed window? Don't, you wouldn't do it in real life, so don't do it in game.
Conclusion, scs were right not to block, we should practice self control.

So you can try/test (options 1 to 5) having a window block to see if you agree with SCS not providing this function.

I'm using a Tobii eye track system variable for the option 1 block (needed a variable and this was handy), so if you have a Tobii don't do this.
I've removed VR head yaw movement, so VR won't work with this. NEW - VR & Tobii options at the bottom (untested).
g_cam_block isn't used (can't be used), so no need to set it.
All options are my preferred settings, feel free to modify them to suit your setup. You don't have to have both windows open at the same time for example. Scroll to bottom for some help info, more will be added in time.

Backup your controls.sii file. You'll need it back after test if not happy with the block.
Test with the simpler option 2, 3, 4 or 5 first to see if you like the idea of being blocked.


Option 1 (Scroll way down for options 2, 3, 4 and 5 and help info):
You need to set these two lines in your global config.cfg file.
uset g_developer "1"
uset g_console "1"

Edit controls.sii file.
NOTE: line numbers may be different, be sure to keep yours:

config_lines[53]: "constant c_et_head 1.000000" <-- change to 0.000000

Replace this line:
config_lines[244]: "mix headtryaw `sel(trackiron, trackiryaw, 0) + sel(hmdon, hmdyaw, 0) + sel(eyeposon, eyeposyaw, 0)`"
With this line:
config_lines[244]: "mix headtryaw `clamp(sel(trackiron, trackiryaw, 0), -1.45, c_et_head + 0.45)`"
Close and save.

Startup game and get to driving cab view.
Can you look around? Yes - No, check controls.sii headtryaw line for typo.
Is your left view blocked at the window? Yes
Open the window. Left view is still blocked? Yes
Now for the manual bit (it isn't automatic at this stage of the setup).
Console type c_et_head 1 enter and close console.
Can you now stick your head out of the window? Yes
Close the window.
Console type c_et_head 0 enter and close console.
Left view is back to being blocked at the window.

Basically, from now on, do this:
Open window, console type c_et_head 1 enter close console.
Close window, console type c_et_head 0 enter close console.

You'll either get sick of doing that or you'll not like being blocked in the first place and SCS were right all along.

We need the window position variable used to try to make this an automatic process. But i don't know what it is. Perhaps save file will tell us? I believe it saves the window state in there.

If you like doing the above, then read the next bit to make it a bit better.
Options 2, 3, 4 or 5 are best to start with.
Here is my way to automate the above window open/close/block/actions:
Use logitech profiler software that i use for my G27 wheel.
Record key strokes/timing and assign to a wheel key.
Export the profile and edit with notepad to change timing values to be exactly what is required.
Import the updated profile.
This post has the key timing info i used to test this: viewtopic.php?p=19423#p19423
Use the below work flow as an example of what i think should happen.

config_lines[299]: "mix rwinopen `keyboard.darrow?0 | semantical.rwinopen?0`"
config_lines[300]: "mix rwinclose `keyboard.uarrow?0 | semantical.rwinclose?0`"
config_lines[301]: "mix lwinopen `keyboard.darrow?0 | semantical.lwinopen?0`"
config_lines[302]: "mix lwinclose `keyboard.uarrow?0 | semantical.lwinclose?0`"

Using that above i want both windows to open at the same time so audio plays in both ears rather than one. So that code will be fine using up and down arrow keys.

LWMB = Left Wheel Middle Button - open window.
RWMB = Right Wheel Middle Button - close window.

Only LWMB or RWMB are pressed. The rest are recorded key strokes played back.

Quick press LWMB and the following happens:
Down arrow is pressed for 3 seconds (if that equals ~70% window open).
Down arrow is quick pressed again to stop window motion.
console c_et_head 1 enter close console.
The window is now open enough to put your head out.

Another Quick press LWMB and the following happens:
Down arrow is pressed for 3 seconds (100% window open).
Down arrow is quick pressed again to stop window motion.
console c_et_head 1 enter close console.
The window is now fully open to put your head out.

Quick press RWMB and the following happens:
console c_et_head 0 enter close console - to stop head being trapped!.
Up arrow is pressed for 3 seconds (if that equals ~30% window open from 100% open).
Up arrow is quick pressed again to stop window motion.
The window is now 30% open and you can't put your head out.

Another Quick press RWMB and the following happens:
console c_et_head 0 enter close console.
Up arrow is pressed for 3 seconds (window closed).
Up arrow is quick pressed again to stop window motion.
The window is now closed and you can't put your head out.

Quick list of window options:
LWMB -> 70% open -> RWMB -> closed.
LWMB -> 70% open -> LWMB -> fully open -> RWMB -> 30% open -> RWMB -> closed.

So you can have the windows closed and not be able to put your head out of the window.
Or you can have the windows open 30% to hear the outside world whilst not being able to put your head out of the window.
Or you can have the windows 70% open to hear the outside world and can put your head out of the window.
Or you can have the windows fully open to hear the outside world and still put your head out of the window.

The keys you need to record for the above.
Window open command:
"down"(3 sec)"down""tidle""c""_""e""t""_""h""e""a""d""space""1""enter""tidle"

Window close command:
"tidle""c""_""e""t""_""h""e""a""d""space""0""enter""tidle""up"(3 sec)"up"

(3 sec)=the duration to hold down the "down" or "up" arrow keys for ~70% open or ~30% closed followed by a further press to stop the motion.
Although you record the key presses slowly you do need to alter the timings for each key press otherwise the console will stay open for a few seconds and you have no control of your truck for that period!

Based on my G27 logitech profile pause values, here is what you should try to emulate (lower=faster):
Down key = 3000 (3 sec)
Down key = 66 (stop motion)
Up key = 3000 (3 sec)
Up key = 66 (stop motion)
Tidle key = 99 (open console)
Letter keys = 1 (c_et_head 0/1)
Enter key = 300 (to process command)
That gives me a split second for the console to open and close. The window (3 sec) are key presses and not part of the console process. I found that if the timings are too fast for "enter", "tidle", "up" & "down" then the process fails. Whereas the letter keys were as fast as possible.
If you use Logitech profiler software with a G27 wheel, see this post for the timings i used that you can copy/paste: viewtopic.php?p=19423#p19423

Note: When you first start the game your window state may not match closed. Just do the "open windows" action twice to sync the open/close actions provided by the available options here.


Option 2:
With this line change option your head is blocked until you press and hold joy.b20 (my G27 right wheel middle button).
So no need to use the console for this. Open window and whenever you need to look behind just press and hold button whilst moving your head to look outside.
Selecting reverse (H shifter) will give you full head movement. Optional.
This won't stop you putting your head through a closed window. Only option 1 with automated setup will do that.
Edit controls.sii file.
NOTE: line numbers may/will be different, be sure to keep yours:
Replace this line:
config_lines[244]: "mix headtryaw `sel(trackiron, trackiryaw, 0) + sel(hmdon, hmdyaw, 0) + sel(eyeposon, eyeposyaw, 0)`"
or this line if you've already tried option 1:
config_lines[244]: "mix headtryaw `clamp(sel(trackiron, trackiryaw, 0), -1.45, c_et_head + 0.45)`"
With this line:
config_lines[244]: "mix headtryaw `clamp(sel(trackiron, trackiryaw, 0), -1.45, 0.45) + (sel(trackiron & joy.b20?0, trackiryaw, 0))`"
Close and save.

Optional: Selecting reverse will unblock your head movement as well.
config_lines[244]: "mix headtryaw `clamp(sel(trackiron, trackiryaw, 0), -1.45, 0.45) + (sel(trackiron & joy.b20?0 + joy.b15?0, trackiryaw, 0))`"

Replace joy.b20?0 with what suits you best.
Example: keyboard.space?0 for space bar.


Option 3:
With these line change options you open and close both windows at the same time. When opening the window you can also move your head out of the window but you can't when closing. When the window is fully open and you want to look behind, just press and hold the open window button while moving your head outside.
Yes, you can put your head through an opening window, but just watch it open before putting your head out.

Basically, these are the options you have:
This won't stop you from putting your head out of a closed window.
You don't do that in real life, so don't do it when using this option.
By default your view is blocked at the window.
Press and hold window open button will give you full head movement and open windows.

G27 left (joy.b21 / open) right (joy.b20 / close) wheel middle buttons.
Edit controls.sii file.
NOTE: line numbers may/will be different, be sure to keep yours:
config_lines[299]: "mix rwinopen `joy.b21?0 |semantical.rwinopen?0`"
config_lines[300]: "mix rwinclose `joy.b20?0 |semantical.rwinclose?0`"
config_lines[301]: "mix lwinopen `joy.b21?0 |semantical.lwinopen?0`"
config_lines[302]: "mix lwinclose `joy.b20?0 |semantical.lwinclose?0`"

config_lines[244]: "mix headtryaw `clamp(sel(trackiron, trackiryaw, 0), -1.45, 0.45) + (sel(trackiron & joy.b21?0, trackiryaw, 0))`"
Close and save.


Option 4:
The same as option 3 but here i can select reverse (H shifter) and have full head movement through the window, so i don't have to hold window open button at the same time as reversing and steering, although i should open the window first (selecting reverse with closed windows won't block you).
With these line change options you open and close both windows at the same time. When opening the window you can also move your head out of the window but you can't when closing. When the window is fully open and you want to look behind, just press and hold the open window button while moving your head outside or select reverse.
Yes, you can put your head through an opening window, but just watch it open before putting your head out.

Basically, these are the options you have:
This won't stop you from putting your head out of a closed window.
You don't do that in real life, so don't do it when using this option.
By default your view is blocked at the window.
Press and hold window open button will give you full head movement and open windows.
Selecting reverse (H shifter) will give you full head movement.
Selecting reverse (H shifter) will give you full head movement and open windows (optional).

G27 left (joy.b21 / open) right (joy.b20 / close) wheel middle buttons - Reverse (joy.b15) on H shifter.
Edit controls.sii file.
NOTE: line numbers may/will be different, be sure to keep yours:
config_lines[299]: "mix rwinopen `joy.b21?0 |semantical.rwinopen?0`"
config_lines[300]: "mix rwinclose `joy.b20?0 |semantical.rwinclose?0`"
config_lines[301]: "mix lwinopen `joy.b21?0 |semantical.lwinopen?0`"
config_lines[302]: "mix lwinclose `joy.b20?0 |semantical.lwinclose?0`"

config_lines[244]: "mix headtryaw `clamp(sel(trackiron, trackiryaw, 0), -1.45, 0.45) + (sel(trackiron & joy.b21?0 + joy.b15?0, trackiryaw, 0))`"
Close and save.

If you want the windows to automatically open when selecting reverse, do this:
config_lines[299]: "mix rwinopen `joy.b21?0 |joy.b15?0 |semantical.rwinopen?0`"
config_lines[301]: "mix lwinopen `joy.b21?0 |joy.b15?0 |semantical.lwinopen?0`"
Selecting reverse allows full head movement, may as well open windows ready for looking back.


Option 5:
The same as option 4 but if you press and hold both open & close window buttons you can look out if you turn your head. Handy if the window is already open halfway and you don't want to open anymore in order to look out for a quick glance, when you let go of the buttons you'll need to do a quick tap on one or both to stop the window motion if it starts.
Here i can select reverse (H shifter) and have full head movement through the window, so i don't have to hold window open button at the same time as reversing and steering, although i should open the window first (selecting reverse with closed windows won't block you).
With these line change options you open and close both windows at the same time. When opening the window you can also move your head out of the window but you can't when closing.
When the window is fully open and you want to look behind, just press and hold the open window button while moving your head outside or select reverse.
Yes, you can put your head through an opening window, but just watch it open before putting your head out.

Basically, these are the options you have:
This won't stop you from putting your head out of a closed window.
You don't do that in real life, so don't do it when using this option.
By default your view is blocked at the window.
Press and hold window open button will give you full head movement and open windows.
Selecting reverse (H shifter) will give you full head movement.
Selecting reverse (H shifter) will give you full head movement and open windows (optional).
Press and holding both window open and window close buttons will give you full head movement but windows will not move.

G27 left (joy.b21 / open) right (joy.b20 / close) wheel middle buttons - Reverse (joy.b15) on H shifter.
Edit controls.sii file.
NOTE: line numbers may/will be different, be sure to keep yours:
config_lines[299]: "mix rwinopen `joy.b21?0 |semantical.rwinopen?0`"
config_lines[300]: "mix rwinclose `joy.b20?0 |semantical.rwinclose?0`"
config_lines[301]: "mix lwinopen `joy.b21?0 |semantical.lwinopen?0`"
config_lines[302]: "mix lwinclose `joy.b20?0 |semantical.lwinclose?0`"

config_lines[244]: "mix headtryaw `clamp(sel(trackiron, trackiryaw, 0), -1.45, 0.45) + (sel(trackiron & joy.b21?0 + joy.b15?0, trackiryaw, 0)) + (sel(trackiron & joy.b20?0 & joy.b21?0, trackiryaw, 0))`"

Or rather than press and hold both open and close window buttons for quick glance, press and hold space bar instead in this example:
config_lines[244]: "mix headtryaw `clamp(sel(trackiron, trackiryaw, 0), -1.45, 0.45) + (sel(trackiron & joy.b21?0 + joy.b15?0, trackiryaw, 0)) + (sel(trackiron & keyboard.space?0, trackiryaw, 0))`"
Close and save.

If you want the windows to automatically open when selecting reverse, do this:
config_lines[299]: "mix rwinopen `joy.b21?0 |joy.b15?0 |semantical.rwinopen?0`"
config_lines[301]: "mix lwinopen `joy.b21?0 |joy.b15?0 |semantical.lwinopen?0`"
Selecting reverse allows full head movement, may as well open windows ready for looking back.

===============================================================================================

VR option (untested and may cause undesirable results):
Same as option 2 above but with VR instead of TRACKIR yaw.
config_lines[244]: "mix headtryaw `clamp(sel(hmdon, hmdyaw, 0), -1.45, 0.45) + (sel(hmdon & joy.b20?0 , hmdyaw, 0))`"

Same as option 3 & 4 above but with VR instead of TRACKIR yaw.
config_lines[244]: "mix headtryaw `clamp(sel(hmdon, hmdyaw, 0), -1.45, 0.45) + (sel(hmdon & joy.b21?0 + joy.b15?0, hmdyaw, 0))`"


TOBII eye option (untested and may cause undesirable results):
Same as option 2 above but with TOBII eye instead of TRACKIR yaw.
config_lines[53]: "constant c_et_head 1.000000"
config_lines[244]: "mix headtryaw `clamp(sel(eyeposon, eyeposyaw, 0), -1.45, 0.45) + (sel(eyeposon & joy.b20?0, eyeposyaw, 0))`"

Same as option 3 & 4 above but with TOBII eye instead of TRACKIR yaw.
config_lines[53]: "constant c_et_head 1.000000"
config_lines[244]: "mix headtryaw `clamp(sel(eyeposon, eyeposyaw, 0), -1.45, 0.45) + (sel(eyeposon & joy.b21?0 + joy.b15?0, eyeposyaw, 0))`"


How to config to suit your setup:
By default these setups will block your view at the window. NOTE: Option 2, 3, 4 & 5 - When unblocked, your head can still pass through the window regardless of window position. This is a "possible" solution and not a complete fix like the SCS mouse user block option.

If you don't know the name of the button you want to use, set that button to "horn" in game and then look in controls.sii for horn.
config_lines[279]: "mix horn `joy.b21?0 | semantical.horn?0`"
You can now copy your button name (joy.b21?0) to BUTTON in example here:
config_lines[244]: "mix headtryaw `clamp(sel(trackiron, trackiryaw, 0), -1.45, 0.45) + (sel(trackiron & BUTTON, trackiryaw, 0))`"
Unassign that button from horn or you'll hear the horn everytime you unblock and look out the window!

Pressing and holding an assigned BUTTON will allow your head to pass through the window. Like this:
config_lines[244]: "mix headtryaw `clamp(sel(trackiron, trackiryaw, 0), -1.45, 0.45) + (sel(trackiron & BUTTON, trackiryaw, 0))`"

Pressing and holding either assigned BUTTONS will allow your head to pass through the window. Like this:
config_lines[244]: "mix headtryaw `clamp(sel(trackiron, trackiryaw, 0), -1.45, 0.45) + (sel(trackiron & BUTTON1 + BUTTON2, trackiryaw, 0))`"

Pressing and holding both assigned BUTTONS will allow your head to pass through the window. Like this:
config_lines[244]: "mix headtryaw `clamp(sel(trackiron, trackiryaw, 0), -1.45, 0.45) + (sel(trackiron & BUTTON1 & BUTTON2, trackiryaw, 0))`"
Last edited by JHTrucker on July 26th, 2020, 9:22 pm, edited 8 times in total.
NPI AA: viewtopic.php?p=13049#p13049
TRACKIR closed window block: viewtopic.php?p=19250#p19250
Additional non standard screen configs: viewtopic.php?p=17658#p17658
User avatar
JHTrucker
Posts: 839
Joined: February 7th, 2020, 3:19 pm
Location: UK

TRACKIR Open/Close window block (possible) solutions.

Post by JHTrucker » April 27th, 2020, 11:53 pm

@BenganJ - Option 2 added.
viewtopic.php?p=19250#p19250
NPI AA: viewtopic.php?p=13049#p13049
TRACKIR closed window block: viewtopic.php?p=19250#p19250
Additional non standard screen configs: viewtopic.php?p=17658#p17658
User avatar
BenganJ
Moderator
Posts: 7980
Joined: December 15th, 2018, 11:54 am
Location: Gothenburg, Sweden

TRACKIR Open/Close window block (possible) solutions.

Post by BenganJ » April 27th, 2020, 11:57 pm

@JHTrucker

Noted, but have so little time to test right now. It is good to have alternatives though! Thanks mate! :D
---------------------------------------------------------------------------------------------------------------------------------------------
System: Windows 8.1
Processor: Intel Core i7-4790@
Memory: 16GB
Graphics: ASUS GeForce GTX1660Ti
Image
User avatar
JHTrucker
Posts: 839
Joined: February 7th, 2020, 3:19 pm
Location: UK

TRACKIR Open/Close window block (possible) solutions.

Post by JHTrucker » April 28th, 2020, 1:38 am

@BenganJ - Option 3 added.
viewtopic.php?p=19250#p19250
This would be my choice i think.

I don't want all this hard work lost inside this thread, if you want to test it before deciding if its worth moving it so it's more readily noticed by forum visitors, ok. Thanks.
NPI AA: viewtopic.php?p=13049#p13049
TRACKIR closed window block: viewtopic.php?p=19250#p19250
Additional non standard screen configs: viewtopic.php?p=17658#p17658
User avatar
BenganJ
Moderator
Posts: 7980
Joined: December 15th, 2018, 11:54 am
Location: Gothenburg, Sweden

TRACKIR Open/Close window block (possible) solutions.

Post by BenganJ » April 28th, 2020, 1:49 am

@JHTrucker

This is some really nicely done work mate, so I won't hesitate for one minute now
to move this to it's own topic, BUT in order for you to be able to maintain the first
post of that topic I want you to find a proper place for it and then create that first
post as a placeholder. You don't have to place any contents, just a text to indicate
it as a placeholder. Then I will move your main post in this topic to that new topic
and maybe add what is having any substance from here there too.

Just tell me when you have created the topic and where!
---------------------------------------------------------------------------------------------------------------------------------------------
System: Windows 8.1
Processor: Intel Core i7-4790@
Memory: 16GB
Graphics: ASUS GeForce GTX1660Ti
Image
User avatar
JHTrucker
Posts: 839
Joined: February 7th, 2020, 3:19 pm
Location: UK

Re: TRACKIR Open/Close window block (possible) solutions.

Post by JHTrucker » April 28th, 2020, 1:02 pm

Option 4 added.
viewtopic.php?p=19250#p19250
This would be my choice when i move to 1.37, it works very well in 1.36 without the window bits.
NPI AA: viewtopic.php?p=13049#p13049
TRACKIR closed window block: viewtopic.php?p=19250#p19250
Additional non standard screen configs: viewtopic.php?p=17658#p17658
User avatar
BenganJ
Moderator
Posts: 7980
Joined: December 15th, 2018, 11:54 am
Location: Gothenburg, Sweden

Re: TRACKIR Open/Close window block (possible) solutions.

Post by BenganJ » April 28th, 2020, 2:14 pm

@JHTrucker

DAMN, you didn't stop there either! :lol: :lol: :lol: And I see that you advertise or link
to the new forum place in the old category too! Grand job, mate! :D
---------------------------------------------------------------------------------------------------------------------------------------------
System: Windows 8.1
Processor: Intel Core i7-4790@
Memory: 16GB
Graphics: ASUS GeForce GTX1660Ti
Image
alonzam99
Posts: 100
Joined: April 17th, 2020, 2:47 pm

Re: TRACKIR Open/Close window block (possible) solutions.

Post by alonzam99 » April 28th, 2020, 2:47 pm

hey JHTrucker, thanks for the solutions for the Trackir window block solutino but can you make a video about how to use each method and how to automate it ?
because it is hard to me to understand from text.
thanks :)
Post Reply