A virtual reality system, wherein comprising: a head-mounted display, an input device and a positioning module, wherein the head-mounted display comprises a central processing unit, a camera module connected with the central processing unit and a wireless connection module; the camera module comprises a binocular fisheye camera, an IR camera and a TOF camera, the positioning module comprises a first inertial measurement unit provided on the head-mounted display, an electromagnetic receiver provided on the head-mounted display, a second inertial measurement unit provided on the input device and an electromagnetic transmitter provided on the input device; and the central processing unit is further connected with the first inertial measurement unit and the electromagnetic receiver respectively, and configured to implement data interaction and command control with the binocular fisheye camera, the IR camera, the TOF camera, the wireless connection module, the first inertial measurement unit and the electromagnetic receiver, so as to identity 6-DoF spatial positioning of the head-mounted display, 6-DoF spatial positioning of the input device, and implement an obstacle avoidance function, a gesture recognition function, an eyeball tracking function and a wireless transmission function of the virtual reality system, wherein the input device is further provided with a wireless transmission module; the second inertial measurement unit, within the input device, is configured to obtain spatial attitude data of the input device and send the spatial attitude data to the central processing unit through the electromagnetic transmitter and the wireless connection module; the electromagnetic transmitter is configured to transmit electromagnetic data; the electromagnetic receiver is configured to receive the electromagnetic data transmitted by the electromagnetic transmitter and send the electromagnetic data to the central processing unit; and the central processing unit is configured to calculate a relative positional relationship between the input device and the head-mounted display according to the received electromagnetic data, thereby identify the 6-DoF spatial positioning of the input device based on the relative positional relationship and the received spatial attitude data. the camera module comprises a binocular fisheye camera, an IR camera and a TOF camera, the positioning module comprises a first inertial measurement unit provided on the head-mounted display, an electromagnetic receiver provided on the head-mounted display, a second inertial measurement unit provided on the input device and an electromagnetic transmitter provided on the input device; and the central processing unit is further connected with the first inertial measurement unit and the electromagnetic receiver respectively, and configured to implement data interaction and command control with the binocular fisheye camera, the IR camera, the TOF camera, the wireless connection module, the first inertial measurement unit and the electromagnetic receiver, so as to identity 6-DoF spatial positioning of the head-mounted display, 6-DoF spatial positioning of the input device, and implement an obstacle avoidance function, a gesture recognition function, an eyeball tracking function and a wireless transmission function of the virtual reality system, wherein the input device is further provided with a wireless transmission module; the second inertial measurement unit, within the input device, is configured to obtain spatial attitude data of the input device and send the spatial attitude data to the central processing unit through the electromagnetic transmitter and the wireless connection module; the electromagnetic transmitter is configured to transmit electromagnetic data; the electromagnetic receiver is configured to receive the electromagnetic data transmitted by the electromagnetic transmitter and send the electromagnetic data to the central processing unit; and the central processing unit is configured to calculate a relative positional relationship between the input device and the head-mounted display according to the received electromagnetic data, thereby identify the 6-DoF spatial positioning of the input device based on the relative positional relationship and the received spatial attitude data.