\

Webcam head tracking, webcam to control in‑game FOV

78 points - last Saturday at 2:42 PM

Source
  • atmanactive

    today at 6:05 PM

    While we're on the subject, there's also TrackyMouse: https://trackymouse.js.org/

    • jai_

      today at 11:56 AM

      Cool to see this, it's a cool in-between step for not having additional wraparound screens or a VR headset.

      I used to run a similar software[1] for when I was really into playing F1 racing games. However one of the problems I found was the initial disconnect in your head and eye movement that took some getting used to.

      For example, if you want to look left to see an upcoming turn, naturally your eyes move before your head, and your head follows after. With this software enabled, you have to consciously inverse the process where your head moves a direction, but your eyes still remain looking forward at the screen.

      It took a some getting used to and resulting in some dizziness afterwards, but was fun.

      [1]: https://facetracknoir.sourceforge.net/home/default.htm

        • Freaky

          today at 12:19 PM

          opentrack would be the one to beat these days: https://github.com/opentrack/opentrack

          It's completely replaced my TrackIR 5, since it averts the need to wear headphones and dig out the tracking bracket every time I want to use it, and the accuracy feels about the same.

          I found head tracking pretty much becomes second-nature after a while - to the point at which it feels weird to play first-person sims without it. Not quite as fancy as VR, but much more comfortable and much more practical.

            • itsloopyo

              today at 3:43 PM

              Head tracking's great, the reasons it became a niche thing are easy to overcome in 2026. I've been churning out loads of decoupled look+aim head tracking mods for non-sims with this in mind (all OpenTrack compatible) - https://github.com/itsloopyo#the-mods

              • arrowleaf

                today at 5:14 PM

                Do you really prefer webcam + opentrack over the trackir? Asking because I literally have a trackir on the way to me in the mail, and most discussions I could find were at least 2-3 years old.

        • hyperific

          today at 12:25 PM

          Also check out the SmoothTrack mobile app. Same use case but the compute is done on a phone instead of the gaming machine. Head position data can be sent over local network or USB.

            • epaga

              today at 2:41 PM

              Hey! Thanks for recommending this!! That’s my app. :) pushing the tracking work off to the phone is helpful for freeing up resources on the computer.

                • simpaticoder

                  today at 2:44 PM

                  Is there specialized face/head tracking hardware on phones like there is on DSLR cameras?

                    • epaga

                      today at 2:50 PM

                      Yes indeed - ARCore on Android, ARKit on iPhone - AR optimizations are crazy good.

                  • hyperific

                    today at 4:47 PM

                    Thanks for making a fantastic tool!

            • fidotron

              today at 3:32 PM

              You can do some related tricks to this in browsers too: https://github.com/atomirex/fishtank-js (example https://atomirex.github.io/fishtank-js/dist/index.html )

              There is a greatly cleaner version of the same idea in the React Fiber libraries these days as well.

              • oyagci

                today at 12:12 PM

                What are the differences between OpenTrack and this ?

                  • russdill

                    today at 4:40 PM

                    It was discovered and completely reimplemented independently without knowledge that Opentrack exists? That's the only thing I can figure. Except they actually mention TrackIR as that's the input method they are using.

                • iamjackg

                  today at 2:47 PM

                  It would be cool to use something like this or openfov to control OBS to automatically switch between different cameras/scenes when you turn your head. Either multiple cameras, or switching between screenshare/camera if you look directly into the camera.

                  • gchamonlive

                    today at 12:52 PM

                    It would be nice to know the limits of this tech, like how does it tolerate head gears and garments like headphones or hoodies, beanies and glasses, long hard, different skin colour and facial features or even background contrast.

                    • fxwin

                      today at 11:57 AM

                      Hmm, from the title i expected a tool to calibrate FOV angle to monitor size/distance

                      • cubefox

                        today at 12:13 PM

                        Wouldn't it be better to use head tracking to get the position of the head relative to the monitor, so the monitor behaves like a window? Like in Johnny Lee's classic Wii demo [1].

                        The way it currently works (rotating the view upon head rotation) doesn't really make sense because a monitor is not a head mounted display.

                        1: https://youtube.com/watch?v=Jd3-eiid-Uw

                          • Saris

                            today at 1:01 PM

                            If it behaved like a window you wouldn't be able to look beside or behind yourself in game, this type of setup is used a lot for sim games.

                              • dybber

                                today at 1:10 PM

                                But if you look behind yourself your head is pointing away from the screen.

                                  • Foxhuls

                                    today at 1:12 PM

                                    Typically people don’t use 1:1 movement when using something like this. It’s a much higher ratio so you only have to slightly move your head to look around. It allows you to do it quicker but also avoids exactly what you’re describing.

                                    • simpaticoder

                                      today at 2:57 PM

                                      Not necessarily if you've got a curved ultra-wide display. Combine this with some rotation factor and you can look around while still looking at the screen.

                                      • Saris

                                        today at 1:18 PM

                                        It's not a 1:1 link with these, turning your head only slightly is enough to look behind in game.

                                • Mashimo

                                  today at 12:27 PM

                                  > The way it currently works doesn't really make sense

                                  And yet, sim players are using it. Players want to use small headmovements to simulate large head movements ingame. It seems to work.

                                    • cubefox

                                      today at 3:22 PM

                                      Wouldn't it be much more convenient then to buy a VR headset which actually follows your head movements because it's physically head mounted? Not to mention that it provides a stereoscopic view of the scenery. I guess the price is a hurdle.

                                        • jhomedall

                                          today at 4:12 PM

                                          I have a VR headset and still prefer head tracking. It's more comfortable, and becomes second nature after an hour or two of use.

                                  • adolph

                                    today at 3:28 PM

                                    My kid is using a webcam based head tracker with a combat flight sim of some sort. You don't want to move your head too far since you are looking at the monitor right? It works kind of like mouse acceleration where if you move your head quickly, it changes perspective further.

                                      • russdill

                                        today at 4:41 PM

                                        Yes, this tech has long been used to great effect for flight sims. It might seem odd if you've never used it, but it turns out it's very intuitive.

                                • markun

                                  today at 12:14 PM

                                  Wonder if I could use that to swipe through virtual desktops?

                                  • itsthecourier

                                    today at 11:45 AM

                                    when your head move, and with it your eyes, you move what's in front of them to your perspective inside the simulation, just as VR works

                                    but in this case it is detrimental because the screen is fixed, the natural behavior would be not to move it

                                    or at least do very little with it like a parallax

                                    the current demo would cause nausea after a moment

                                      • Foxhuls

                                        today at 12:55 PM

                                        This is a good example of having sound logic but not understanding the actual use case. It's simply a way to add functionality in a way to attempt to mimic what humans are capable of in a game. Not everyone wants to or is capable of using VR for various reasons. This allows you to use a slight physical movement of your head to replace using a mouse to move the camera, primarily in flight and racing simulators. That means you don't have to take your hand off of the racing wheel to move a mouse around, or even need to have a mouse available to you.

                                        • oyagci

                                          today at 12:13 PM

                                          People playing simulators such as DCS are used to have head tracking with OpenTrack. It's very helpful

                                          • Mashimo

                                            today at 11:50 AM

                                            Have you tried it or is that your theory?

                                            Don't all headtrackers work like this? Also the infrared ones.

                                            • Saris

                                              today at 1:00 PM

                                              Tons of people use head tracking like this via TrackIR and similar setups, it's quite common for space or air sim games.

                                            • purrcat259

                                              today at 11:52 AM

                                              When I used a head tracker (homemade infrared one), I just got used to shifting my head but keeping my eyes on the screen. Having a wider screen helps.

                                                • quietsegfault

                                                  today at 12:10 PM

                                                  I learned how to shift my head only a little bit to move the FOV a lot when using one of those infrared trackers. Still kinda hurt my neck.

                                              • jnewton_dev

                                                today at 1:01 PM

                                                This is underrated advice. Wish someone told me this 5 years ago.

                                            • numpad0

                                              today at 12:57 PM

                                              ...why would webcam head tracking need a new standalone vibecoded project? I thought there are plenty of those already.

                                              • mertleee

                                                today at 5:58 PM

                                                [dead]