The online racing simulator
Head tracking using android phone.
head tracking tutorial
  • About:

    Budget VR... No need for any tracking hardware like IR or a webcam..
    This method uses phone's gyroscope and accelerometer and sends it over UDP so pc client can process it.
  • How it will work ?

    you need to have your phone placed on top of your head! may look silly but its worth it.


    before you go deep, this will not work if your phone doesn't have a gyroscope and a accelerometer sensors.

  • How to set up the connection:

    after installing both apps on both devices, we need to configure them so they can connect with each other.
    but first, make sure both PC and Phone are connected to the same Network (WIFI or you can use tethering Hotspot from your phone and connect to it from pc)

    - on your PC:

    Click on your keyboard WINDOWS + R keys, a cmd will appear.
    type: ipconfig then click enter.
    Locate the IPV4 address (looks like this : 192.168.1.12) and save it for next step

    - on your Phone:

    launch the app and scroll down, you must see a field for the IP,
    enter your PC IP there.
    Set port to 4242.

    Now if you hit start tracking on both apps a movement should be detected, however we are not done.
  • How to set up OpenTrack on PC:

    on the main interface:

    set the Input to : UDP over network
    click the hammer icon and set the same port that u typed inside the android app (in our case it was 4242)

    set the Output to : freetrack 2.0 Enhanced

    set the Filter to : Accela
    click the hammer icon and set the same values as shown in this image:
    https://imgur.com/olvL2eM

    Next step: Click Options:

    in the shortcut tab , you can set keybinding
    i just used:
    Center : numberpad 5
    Toggle : numberpad +

    Check both Center at startup and Never translate the application interface

    in the Output tab , set settings as shown in image below
    https://imgur.com/vLPyiLs

    in the Game detectiontab, locate and add LFS.exe
    now close options.

    Next step: Click Mappings:

    set Yaw as shown below:
    https://imgur.com/v0zceoZ

    set Pitch as shown below:
    https://imgur.com/wVLyvke

    set Roll as shown below:
    https://imgur.com/7MG27sf
  • How to set up the phone app:

    simple setup. just apply as below:
    https://imgur.com/aFZwCaS
    i found these values are the best after 2 hour tweaking.
now you are done!

Notes:

- the android app doesn't seem to keep working when screen is locked/off so just turn brightness to lowest to safe battery and prompt the app to use intensive battery or what i mean is allow to run in background, its actually very battery friendly.

- Face your phone towards the screen and click Calibrate for the app to use these coordinates as the origin, make sure its placed flat as possible, as if u set it on table.. Actually just set it on table in front of screen. Yes do that.

- You can center the screen using the binded key and it will use the new center as origin

- everything can work offline as long as they connected to same wireless network

- values for sensors may not work for all devices depending on the gyroscope and accelerometer sensitivity of your device

- You may feel neck pain due to the device weight on your head, remember to take a break sometimes
  • What you can use to set the phone still on your head?

    i used:

    - old headphones.
    - old selfie stick phone holder, took the part out of the stick.
    - some straps.
    - tape.
    aaaaaaaaaaand the vey pro design is : https://imgur.com/dpjfH2D


here's an actual footage of how it works, lag is from recording
https://youtu.be/RtKJpUjY9XE

feel free to ask me any questions related to this thread

ENJOY YOUR CHEAP VR EXPERIACNE!
#2 - zeeaq
How are you strapping your phone to your forehead?
Updated post with full tutorial
#4 - Pukyy
There is another way to do this without strapping a phone to your head, but you'll need a webcam. Or you can use your phone, but you'll need to find an appropriate position for it directly in front of you.

I'm using head tracking in LFS for almost a year now, using Opentrack and AITrack in tandem, as well as Iriun Webcam to send my phone camera output to pc, acting like a webcam. If you're interested I can share the whole process, it gives almost the same result as with this method, without some of the cons.
Quote from zeeaq :How are you strapping your phone to your forehead?

It isn't on forehead, it's on top of your head, like a hat
I've included a photo of what i made in the very last of the post, check it out.
It's basically a headphone, a phon holder from a selfie stick and some straps
I attached the holder uptop in the middle and used iron wires to lock it in place aswell as electric tape, and casual straps (got 2 unused straps from a men's handbag) and made one that goes on back of head and the other on forehead, it gave amazing stability even if violent moves were done.. Not even slips.
Quote from zeeaq :How are you strapping your phone to your forehead?

duct tape

FGED GREDG RDFGDR GSFDG