Automatic viewing angle

I was just wondering whether there’s a way to set the camera view so that it cycles through the various angles automatically, thereby eliminating the need to press the corresponding keys. Such a feature would be of great benefit to me, because I have a movement disorder which makes it difficult to interact with the keyboard while riding.

I believe that if you are running ZWIFT on a PC there is a script you can run that mimics the key presses for you.
I think that is what some YouTubers use when they ‘live stream’ content.

TAZIPFT: Automatically Cycle Camera Angles in Zwift | Zwift Insider

1 Like

I found a post by Eric Schlange containing a reference to “Victor Echo.” Included was a link to a zip archive containing an AutoHotKey script for sending the requisite keyboard codes for changing Zwift’s camera angles. I modified it a bit to add some features I wanted. I don’t know how to upload it with this reply. Perhaps I’ll just paste it into this document.

; Inspired by an original work by  "Victor Echo", here is the result of my effort to enhance his work and add a couple
; of features. Specifically, this script cycles through the camera's viewing angles in random order. Additionally, the
; amount  of time that elapses before a viewing angle changes varies.  Finally, no camera angle is repeated twice in a
; row. In other words, the ensuing camera angle cannot be the same as the preceding one.

; There  are  a couple  other features  I would like  to have  added. For example,  I wanted  to implement more robust
; handling  of Zwift's  "Drone View." I never figured  out how to get AutoHotKey  to send the left, right, up and down
; keys  while in Drone View. Finally, I wanted to implement a method for momentarily superimposing the name of the new
; viewing angle on the screen, each time the camera angle changed.

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.

#UseHook On

#IfWinActive ahk_exe ZwiftApp.exe

        ; The  "Keys"  array contains  the names of  the 10  keys used in  Zwift to invoke  various camera angles. The
        ; "Automated  Zwift Camera Views" script cycles through these keys in random order. You may add or remove keys
        ; by modifying the array. For example, if you'd prefer to omit the "Helicopter chase perspective" view, simply
        ; remove  "NumPad8" (including  quotation marks and trailing  comma) from the Keys array. Since the "Automated
        ; Zwift Camera Views" script selects elements from this array at random, you may add or remove elements in any
        ; order.  In other words, ["NumPad1","NumPad2","NumPad3"] and ["NumPad3","NumPad1","NumPad2"] are functionally
        ; equivalent.

        Keys := ["NumPad1","NumPad2","NumPad3","NumPad4","NumPad5","NumPad6","NumPad7","NumPad8","NumPad9","NumPad0"]
        previousAngle := ""

            Random, index, 1, Keys.MaxIndex() ; Choose a number between the first and last indices of the Keys array,
            nextAngle := "{" . Keys[index] . "}" ; and retrieve the key name at that index.
            if (nextAngle = previousAngle) ; If the next camera angle is equal to the previous camera angle …
                Continue ; … go around (i.e., start over).

            ; In  the following  statement, the "milliseconds" argument of  the Random function will be set to a value
            ; that falls within the range specified by its second and third arguments. By default, that value would be
            ; between  15,000 milliseconds (i.e., 15 seconds) and 30,000 milliseconds (i.e., 30 seconds). The value of
            ; the  milliseconds argument  determines how long a particular  camera angle persists. A new value for the
            ; milliseconds argument is selected each time the camera angle changes. The range from which this value is
            ; chosen  can  be customized by  changing the second  and third arguments  accordingly. To make all camera
            ; angles  change after  the same  interval, set  the second  and third  arguments to  the same  value. For
            ; example,  so that all camera angles will change after 20 seconds, invoke the Random function as follows:
            ; Random, milliseconds, 20000, 20000

            Random, milliseconds, 15000, 30000 ; How long will Zwift maintain this camera angle?
            Send, %nextAngle% ; Switch to the next camera angle.
            Sleep milliseconds ; We'll loiter for a bit…

            previousAngle := nextAngle ; Let's keep track of the last camera angle.

        #2::Pause, Toggle
1 Like