In the Architecture, Engineering and Construction (AEC) field, eye tracking technology is being applied more frequently in cognitive research such as hazard identification. These studies typically use eye tracking in a diagnostic way and pay less attention to the application of virtual environment. However, in virtual environment, eye tracking not only can enhance the study of the cognitive process but also improves the human-computer interaction. Therefore, this paper elaborates on how we use eye tracking devices to track 3D objects in virtual environments diagnostically and interactively. First, we analyze the existing research gaps of using eye tracking in the construction industry. Then, we follow 3D object identification, diagnostic mode and interactive mode to develop a methodology by HTC VIVE device with Pupil Labs HTC Vive Binocular Add-on based on the research gaps. Finally, an example experiment is provided to demonstrate studying hazard identification using eye tracking in construction safety. For analyzing the eye movement data from the participants, we offer the number of confirmations, the scan path and the 3D heatmap of objects in both static and dynamic construction site scenes. This paper provides an approach of applying eye tracking to gather more data in virtual environment for the future cognitive studies and explores the possibility to improve human-computer interaction using eye tracking in the construction industry.