The primary objective of Industry 4.0 is to establish seamless connections between the physical and digital domains. Virtual Reality technology is widely acknowledged as a revolutionary advancement that offers significant technical assistance to many different fields including industry, agriculture and individuals. Since its inception, VR-based education has not gone out of that trend. The paper outlines a methodology for developing virtual interactive applications for the purpose of teaching Mechatronics. Unity software is utilized for creating a three-dimensional virtual robot and its corresponding environment. Subsequently, a user-friendly interface for controlling a robot is constructed. Finally, a lesson plan was developed for the virtual interactive teaching approach in the industrial robot course for the undergraduate Mechatronics Engineering program. The integration of a quantitative evaluation approach, along with the subsequent self-assessment conducted by students upon completion of the module, has unequivocally shown enhancements and efficacy across several competencies with increases ranging from 85 to 92%. The utilization of virtual reality and interactive learning within virtual environments, together with the guidance of instructors, has significantly improved the learning experience and problem-solving abilities of engineering and technology students, enabling them to fulfill the required performance criteria.