Virtual reality (VR) technology has demonstrated that it may be a very valuable and successful training tool for safety simulations. Because of the risk that learner and inexperienced drivers pose to themselves and other road users, it was proposed to create a VR simulation focusing on hazard perception. This project aims to enhance the present 3D testing and training methodologies used for the UK theory driving exam. Unity was used to build a virtual driving environment in which users may practise spotting road dangers and receive feedback on their performance. This is dynamic in nature, with a variety of randomised dangers, day/night cycles, and unpredictable weather patterns. The simulator renders 3D driving scenes using the Unity game engine and incorporates Unity's XR interaction framework for playback across multiple platforms. A variety of evaluations (technology acceptance model, cognitive walkthrough, technical evaluation) revealed that the optimised high-fidelity simulation was simple to use, realistic, immersive, and performant. This study provides a solid foundation for using immersive VR technology to improve hazard awareness training, paving the way for future advancements that may eventually improve road safety.
All code is located within driving-hazard-simulator/Assets/Scripts/
- General: Utility classes for specialised use cases e.g. Simulation config, Day/Night Cycle script, Menu Scene tasks (Start simulation, exit simulation)
- Hazard Management: Consists of main logic and scripting for hazards, hazard detection, analysis and summary.
- InterfacesAndTypes: Foundational unchanging entities e.g. HazardType
- Pathfinding: A* search pathfinding algorithm for random pedestrian movement - credit to Low Poly Epic City by PolyPerfect
- PedestrianBehaviour: Scripting for hazard humans and normal pedestrians
- Traffic: Scripting for traffic cars and traffic light intersections
- VehicleBehaviour: Scripting for hazard cars and the user car (which follows a waypoint system and drives automatically using the wheelcolliders and the unity physics engine)
- Unity 2022 LTS
- AllSky Skybox Set: RPGWhitelock
- PBR Grass Textures: VIS Games
- Stylized Vehicles Pack (Low Poly): Alex Lenk
- Low Poly Epic City: PolyPerfect
- COZY: Stylized Weather 2: Distant Lands
- 100+ PBR Materials Pack: Integrity Software & Games
- 3D rigged human characters: Mixamo
- Human animations: Mixamo