The distance the virtual camera rotates around the vehicle may be based on the angle of the turn the vehicle is performing. The virtual camera system may input the angle of the turn the vehicle is performing, relative to the heading the vehicle was traveling prior to the turn, into a rotation table and output a corresponding camera rotation angle by which the virtual camera may be rotated. The virtual camera system may continually update the camera rotation angle as the vehicle progresses through the turn.
The virtual camera system may determine an anticipated angle of an upcoming turn of the vehicle based on the vehicle's projected trajectory and begin to rotate the virtual camera at a predetermined distance before the vehicle makes the turn. For example, the virtual camera system may determine a distance the vehicle is from the upcoming turn and the anticipated angles of the turn the vehicle will be making. Upon determining the projected turn is located at or less than the predetermined distance, the virtual camera system may begin to rotate the virtual camera through camera rotation angles corresponding to the anticipated angles of the turn.
The virtual camera may remain stationary when the vehicle is stopped or projected to stop. For instance, the virtual camera may determine the vehicle's projected trajectory anticipates the vehicle will pass through a stop light. As such, the virtual camera may not rotate until the car travels through the stop light.