Head Tracking in game menu adjustment solution 1.37/1.38/1.39

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

Head Tracking in game menu adjustment solution 1.37/1.38/1.39

Post by JHTrucker » June 13th, 2020, 5:29 pm

Head Tracking in game menu adjustment solution for TrackIR/OpenTrack etc.
Works with ATS/ETS2 1.37/1.38/1.39 - Don't use the wrong menu mod, your game will crash.

UPDATE: 20/06/2020 - Lines 244 & 245 added to fix head start and end sliders not working & Menu Mod now V2.
UPDATE: 28/07/2020 - Added 1.38 version for the 18 people that downloaded 1.37!
UPDATE: 05/12/2020 - Game version 1.39 should also work with the 1.38 details below.

If, for whatever reason, you would like to make head tracking adjustments in game rather than in your head tracking software, then follow the below instructions.

Note: This solution uses the in game Tobii eye settings menu to adjust your head tracking device.
Don't do this if you have a Tobii eye!
Track IR Menu V2.png
Make a backup copy of controls.sii for safe keeping, just in case.
American/Euro Truck Simulator\profiles\Your Profile\controls.sii

Edit with notepad your controls.sii file, like so:

For game version 1.38 & 1.39 only:
Replace your line numbers with these highlighted changes:
config_lines[219]: "mix trackiryaw ``"
config_lines[220]: "mix trackirpitch ``"
config_lines[221]: "mix trackirroll ``"
config_lines[222]: "mix trackirx ``"
config_lines[223]: "mix trackiry ``"
config_lines[224]: "mix trackirz ``"

config_lines[237]: "mix eyeposon `c_et_head & trackir.device.active?0`"
config_lines[238]: "mix eyeposyaw `trackir.device.position.yaw?0 * c_et_yawsc`"
config_lines[239]: "mix eyepospitch `trackir.device.position.pitch?0 * c_et_pitchsc`"
config_lines[240]: "mix eyeposroll `trackir.device.position.roll?0 * c_et_rollsc`"
config_lines[241]: "mix eyeposx `trackir.device.position.x?0 * c_et_xscale`"
config_lines[242]: "mix eyeposy `trackir.device.position.y?0 * c_et_yscale`"
config_lines[243]: "mix eyeposz `trackir.device.position.z?0 * c_et_zscale`"
config_lines[244]: "mix eyeposwmyaw `trackir.device.position.yaw?0 * c_etwm_yawsc`"
config_lines[245]: "mix eyeposwmpitc `trackir.device.position.pitch?0 * c_etwm_pitsc`"
config_lines[246]: "mix eyeposwmroll `trackir.device.position.roll?0 * c_et_rollsc`"
config_lines[247]: "mix eyeposwmx `trackir.device.position.x?0 * c_et_xscale`"
config_lines[248]: "mix eyeposwmy `trackir.device.position.y?0 * c_et_yscale`"
config_lines[249]: "mix eyeposwmz `trackir.device.position.z?0 * c_et_zscale`"
config_lines[251]: "mix headtryaw `deadzone(sel(eyeposon, eyeposyaw, 0), c_et_hv_sta) / c_et_hv_end`"
config_lines[252]: "mix headtrpitch `deadzone(sel(eyeposon, eyepospitch, 0), c_et_hv_sta)`"

Close and save.
Track IR Menu 1.38.zip
(5.74 KiB) Downloaded 72 times
.
Start game. Get to driving view. Assuming you had head tracking already working, it should still work but will now need adjusting.

Press SHIFT + NUMLOCK to access adjustment menu (Eye Tracking Menu).

Add a button to "Reset Head (Head Tracking)" if you don't already have one (if required).

Press ESCAPE to go back to driving view.

That's it.

For best results, set your head tracking software "curves" to flat lines, then simply adjust sliders in game instead.
Don't ask me for the best settings to use, i have my trackir 3 setup just fine with it's software and so don't use this.
I thought of a way to do it, so i did it, nothing more. Enjoy.

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

For game version 1.37 only:
Replace your line numbers with these highlighted changes:

config_lines[212]: "mix trackiryaw ``"
config_lines[213]: "mix trackirpitch ``"
config_lines[214]: "mix trackirroll ``"
config_lines[215]: "mix trackirx ``"
config_lines[216]: "mix trackiry ``"
config_lines[217]: "mix trackirz ``"

config_lines[230]: "mix eyeposon `c_et_head & trackir.device.active?0`"
config_lines[231]: "mix eyeposyaw `trackir.device.position.yaw?0 * c_et_yawsc`"
config_lines[232]: "mix eyepospitch `trackir.device.position.pitch?0 * c_et_pitchsc`"
config_lines[233]: "mix eyeposroll `trackir.device.position.roll?0 * c_et_rollsc`"
config_lines[234]: "mix eyeposx `trackir.device.position.x?0 * c_et_xscale`"
config_lines[235]: "mix eyeposy `trackir.device.position.y?0 * c_et_yscale`"
config_lines[236]: "mix eyeposz `trackir.device.position.z?0 * c_et_zscale`"
config_lines[237]: "mix eyeposwmyaw `trackir.device.position.yaw?0 * c_etwm_yawsc`"
config_lines[238]: "mix eyeposwmpitc `trackir.device.position.pitch?0 * c_etwm_pitsc`"
config_lines[239]: "mix eyeposwmroll `trackir.device.position.roll?0 * c_et_rollsc`"
config_lines[240]: "mix eyeposwmx `trackir.device.position.x?0 * c_et_xscale`"
config_lines[241]: "mix eyeposwmy `trackir.device.position.y?0 * c_et_yscale`"
config_lines[242]: "mix eyeposwmz `trackir.device.position.z?0 * c_et_zscale`"
config_lines[244]: "mix headtryaw `deadzone(sel(eyeposon, eyeposyaw, 0), c_et_hv_sta) / c_et_hv_end`"
config_lines[245]: "mix headtrpitch `deadzone(sel(eyeposon, eyepospitch, 0), c_et_hv_sta)`"

Close and save.
Track IR Menu V2.zip
(4.03 KiB) Downloaded 87 times
=====================================================================================================

Here are the original game version 1.38 & 1.39 lines, should you require them:

config_lines[219]: "mix trackiryaw `trackir.device.position.yaw?0`"
config_lines[220]: "mix trackirpitch `trackir.device.position.pitch?0`"
config_lines[221]: "mix trackirroll `trackir.device.position.roll?0`"
config_lines[222]: "mix trackirx `trackir.device.position.x?0`"
config_lines[223]: "mix trackiry `trackir.device.position.y?0`"
config_lines[224]: "mix trackirz `trackir.device.position.z?0`"

config_lines[237]: "mix eyeposon `c_et_head & eye_track.head_position_valid?0`"
config_lines[238]: "mix eyeposyaw `eye_track.head_position.yaw?0 * c_et_yawsc`"
config_lines[239]: "mix eyepospitch `eye_track.head_position.pitch?0 * c_et_pitchsc`"
config_lines[240]: "mix eyeposroll `eye_track.head_position.roll?0 * c_et_rollsc`"
config_lines[241]: "mix eyeposx `sel(c_et_pos, eye_track.head_position.x?0 * c_et_xscale, 0)`"
config_lines[242]: "mix eyeposy `sel(c_et_pos, eye_track.head_position.y?0 * c_et_yscale, 0)`"
config_lines[243]: "mix eyeposz `sel(c_et_pos, eye_track.head_position.z?0 * c_et_zscale, 0)`"
config_lines[244]: "mix eyeposwmyaw `eye_track.head_position.yaw?0 * c_etwm_yawsc`"
config_lines[245]: "mix eyeposwmpitc `eye_track.head_position.pitch?0 * c_etwm_pitsc`"
config_lines[246]: "mix eyeposwmroll `eye_track.head_position.roll?0 * c_et_rollsc`"
config_lines[247]: "mix eyeposwmx `sel(c_et_pos, eye_track.head_position.x?0 * c_et_xscale, 0)`"
config_lines[248]: "mix eyeposwmy `sel(c_et_pos, eye_track.head_position.y?0 * c_et_yscale, 0)`"
config_lines[249]: "mix eyeposwmz `sel(c_et_pos, eye_track.head_position.z?0 * c_et_zscale, 0)`"
config_lines[251]: "mix headtryaw `sel(trackiron, trackiryaw, 0) + sel(hmdon, hmdyaw, 0) + sel(eyeposon, eyeposyaw, 0)`"
config_lines[252]: "mix headtrpitch `sel(trackiron, trackirpitch, 0) + sel(hmdon, hmdpitch, 0) + sel(eyeposon, eyepospitch, 0)`"

Here are the original game version 1.37 lines, should you require them:

config_lines[212]: "mix trackiryaw `trackir.device.position.yaw?0`"
config_lines[213]: "mix trackirpitch `trackir.device.position.pitch?0`"
config_lines[214]: "mix trackirroll `trackir.device.position.roll?0`"
config_lines[215]: "mix trackirx `trackir.device.position.x?0`"
config_lines[216]: "mix trackiry `trackir.device.position.y?0`"
config_lines[217]: "mix trackirz `trackir.device.position.z?0`"

config_lines[230]: "mix eyeposon `c_et_head & eye_track.head_position_valid?0`"
config_lines[231]: "mix eyeposyaw `eye_track.head_position.yaw?0 * c_et_yawsc`"
config_lines[232]: "mix eyepospitch `eye_track.head_position.pitch?0 * c_et_pitchsc`"
config_lines[233]: "mix eyeposroll `eye_track.head_position.roll?0 * c_et_rollsc`"
config_lines[234]: "mix eyeposx `sel(c_et_pos, eye_track.head_position.x?0 * c_et_xscale, 0)`"
config_lines[235]: "mix eyeposy `sel(c_et_pos, eye_track.head_position.y?0 * c_et_yscale, 0)`"
config_lines[236]: "mix eyeposz `sel(c_et_pos, eye_track.head_position.z?0 * c_et_zscale, 0)`"
config_lines[237]: "mix eyeposwmyaw `eye_track.head_position.yaw?0 * c_etwm_yawsc`"
config_lines[238]: "mix eyeposwmpitc `eye_track.head_position.pitch?0 * c_etwm_pitsc`"
config_lines[239]: "mix eyeposwmroll `eye_track.head_position.roll?0 * c_et_rollsc`"
config_lines[240]: "mix eyeposwmx `sel(c_et_pos, eye_track.head_position.x?0 * c_et_xscale, 0)`"
config_lines[241]: "mix eyeposwmy `sel(c_et_pos, eye_track.head_position.y?0 * c_et_yscale, 0)`"
config_lines[242]: "mix eyeposwmz `sel(c_et_pos, eye_track.head_position.z?0 * c_et_zscale, 0)`"
config_lines[244]: "mix headtryaw `sel(trackiron, trackiryaw, 0) + sel(hmdon, hmdyaw, 0) + sel(eyeposon, eyeposyaw, 0)`"
config_lines[245]: "mix headtrpitch `sel(trackiron, trackirpitch, 0) + sel(hmdon, hmdpitch, 0) + sel(eyeposon, eyepospitch, 0)`"
Last edited by JHTrucker on December 5th, 2020, 3:13 pm, edited 17 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: 796
Joined: February 7th, 2020, 3:19 pm
Location: UK

Re: Head Tracking in game menu adjustment solution

Post by JHTrucker » June 18th, 2020, 8:09 pm

First post updated. Added menu mod (ATS/ETS2 1.37) to just show Track IR sliders, removing the rest of the menu options.
Fixed line 230 to switch on/off head tracking via new menu.
config_lines[230]: "mix eyeposon `c_et_head & trackir.device.active?0`"
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: 796
Joined: February 7th, 2020, 3:19 pm
Location: UK

Re: Head Tracking in game menu adjustment solution

Post by JHTrucker » June 20th, 2020, 6:13 pm

First post updated: Lines 244 & 245 added to fix head start and end sliders not working & Menu Mod now V2.
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: 796
Joined: February 7th, 2020, 3:19 pm
Location: UK

Re: Head Tracking in game menu adjustment solution

Post by JHTrucker » June 22nd, 2020, 2:19 pm

If you are using this on ATS 1.38 with the menu mod... does the mod still work ok?
I'm staying on 1.37 until after public release.
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
JHTrucker
Posts: 796
Joined: February 7th, 2020, 3:19 pm
Location: UK

Re: Head Tracking in game menu adjustment solution 1.37 & 1.38

Post by JHTrucker » July 28th, 2020, 8:12 pm

Added 1.38 version for the 18 people that downloaded 1.37!
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
Post Reply