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

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

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

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/1.40 - Don't use the wrong menu mod, your game will crash.
Note: If your head tracking software isn't working correctly then this isn't a solution to fix it.

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.
UPDATE: 01/04/2021 - Game version 1.40 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/1.40 only: Using below "Track IR Menu 1.38.zip"
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
.
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: Using below "Track IR Menu V2.zip"
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
=====================================================================================================

Here are the original game version 1.38/1.39/1.40 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 May 18th, 2021, 5:44 pm, edited 22 times in total.
multimon_config.sii files: viewtopic.php?p=17658#p17658
controls.sii edits: viewtopic.php?p=24744#p24744
TrackIR edits: viewtopic.php?p=46613#p46613
Extra Cameras: viewtopic.php?p=46034#p46034
User avatar
JHTrucker
Expert
Posts: 1334
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`"
multimon_config.sii files: viewtopic.php?p=17658#p17658
controls.sii edits: viewtopic.php?p=24744#p24744
TrackIR edits: viewtopic.php?p=46613#p46613
Extra Cameras: viewtopic.php?p=46034#p46034
User avatar
JHTrucker
Expert
Posts: 1334
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.
multimon_config.sii files: viewtopic.php?p=17658#p17658
controls.sii edits: viewtopic.php?p=24744#p24744
TrackIR edits: viewtopic.php?p=46613#p46613
Extra Cameras: viewtopic.php?p=46034#p46034
User avatar
JHTrucker
Expert
Posts: 1334
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.
multimon_config.sii files: viewtopic.php?p=17658#p17658
controls.sii edits: viewtopic.php?p=24744#p24744
TrackIR edits: viewtopic.php?p=46613#p46613
Extra Cameras: viewtopic.php?p=46034#p46034
User avatar
JHTrucker
Expert
Posts: 1334
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!
multimon_config.sii files: viewtopic.php?p=17658#p17658
controls.sii edits: viewtopic.php?p=24744#p24744
TrackIR edits: viewtopic.php?p=46613#p46613
Extra Cameras: viewtopic.php?p=46034#p46034
User avatar
Keiseiw74
Posts: 34
Joined: May 13th, 2021, 3:08 pm

Re: Head Tracking in game menu adjustment solution 1.37/1.38/1.39/1.40

Post by Keiseiw74 » May 18th, 2021, 3:43 pm

I have a question what is needed for this to work?
1.ETS2 & ATS
2.Track IR Menu 1.38.zip
3.Camera?
4. aitrack (Alpha) v0.6.4 ???
5.opentrack 2.3.13 ???
Would it be possible to record a step-by-step tutorial on how to do it, because after the entry in the controls.sii file, it is described very generally. greetings
User avatar
JHTrucker
Expert
Posts: 1334
Joined: February 7th, 2020, 3:19 pm
Location: UK

Re: Head Tracking in game menu adjustment solution 1.37/1.38/1.39/1.40

Post by JHTrucker » May 18th, 2021, 4:49 pm

@Keiseiw74 - This is just for anyone that has TrackIR or camera & opentrack etc already working in game.
By using the latest mod and the controls.sii edits you then have an in game menu to adjust settings instead... that's all.
I only have mobile data internet and therefore don't do youtube stuff.
multimon_config.sii files: viewtopic.php?p=17658#p17658
controls.sii edits: viewtopic.php?p=24744#p24744
TrackIR edits: viewtopic.php?p=46613#p46613
Extra Cameras: viewtopic.php?p=46034#p46034
User avatar
BenganJ
Moderator
Posts: 9919
Joined: December 15th, 2018, 11:54 am
Location: Gothenburg, Sweden

Re: Head Tracking in game menu adjustment solution 1.37/1.38/1.39/1.40

Post by BenganJ » May 18th, 2021, 4:53 pm

@Keiseiw74

If you haven't already studied the following topic, do that!

viewtopic.php?p=33103#p33103
---------------------------------------------------------------------------------------------------------------------------------------------
System: Windows 8.1
Processor: Intel Core i7-4790@
Memory: 16GB
Graphics: ASUS GeForce GTX1660Ti
Image
User avatar
Keiseiw74
Posts: 34
Joined: May 13th, 2021, 3:08 pm

Re: Head Tracking in game menu adjustment solution 1.37/1.38/1.39/1.40

Post by Keiseiw74 » May 18th, 2021, 4:59 pm

Will this work with aitrack (Alpha) v0.6.4 i opentrack because I have it installed and configured with the camera ??
However, I have a problem with the right attitude left and right. I was hoping it would help
User avatar
JHTrucker
Expert
Posts: 1334
Joined: February 7th, 2020, 3:19 pm
Location: UK

Re: Head Tracking in game menu adjustment solution 1.37/1.38/1.39/1.40

Post by JHTrucker » May 18th, 2021, 5:12 pm

@Keiseiw74 - No, like i said, it just enables a menu to adjust TIR settings.
It doesn't add anything to the game or make the head tracking work differently.
If your head tracking doesn't work correctly then this isn't a solution for you.
I have a TrackIR 3 (for 16 years) and know nothing in regard to other head tracking solutions.
multimon_config.sii files: viewtopic.php?p=17658#p17658
controls.sii edits: viewtopic.php?p=24744#p24744
TrackIR edits: viewtopic.php?p=46613#p46613
Extra Cameras: viewtopic.php?p=46034#p46034
Post Reply