Scripting
Scripting is the process of writing code to make the 3D models interactive. The VR equipment used for the engineering labs include hand-held controllers. By creating a script we can decide what to do when a controller (effectively the user's hand) comes near or in-contact with the 3D model. We also use scripts to define motion or behaviors. For example, if you want to make a switch in the VR environment, then you must write a script that interacts with the controller, causes the 3D model to move appropriately, and then "turns on" whatever the switch is connected to.
There are fundamentally two types a scripts. One is a script that is completely unique to your project. For this type of script you get to choose the name of the script and make it do whatever you need for the project to work correctly. The other type of script is effectively a callback script. Each game engine will have a number of functions that are called automatically each frame. (A frame is basically one pass through a the main loop of the program. The faster the main loop is executed the more frames per second your program will have). You extend these second type of functions with the functionality you need. For example, the Unity Game Engine will call an Update() function every frame. By adding your project dependent code in an Update() function your code will be executed every frame.
A simple example of a script that would be called every frame by Unity would be the following:
Starting Scripting
You need to know the fundamentals of programming to start scripting effectively. If you don't know the concepts of an if statement or a for loop then you need to start with the fundamentals. If you know the fundamentals then scripting is generally just C# programming and using the API for your game engine of choice.
Visual Scripting
Game engine designers are always trying to make creating games more accessible. One of the trends is to do visual scripting. This is performed by connecting node-based elements together to create the script graphically. An example of this is the Blueprints Visual Scripting system for the Unreal Engine