Virtual reality scenes can contain sensors, which are nodes that generate events and output values depending on time, navigation, and actions and distance changes in the scene. These nodes add interactivity to the virtual world. You can use Simulink 3D Animation™ functions to read sensor field values into simulation models and control simulation based on the user interaction with the virtual scene. You can write an S-function or a MATLAB Function block that reads the sensor output.
Set up an interface between a Simulink model and sensors in a virtual reality scene.
Interactive mode allows clients to modify a remote virtual world via events from sensor nodes defined in the virtual world.
Read a value of a readable field (either exposedField or eventOut), by synchronizing that field with the vrnode/sync method. After synchronization, each time the field changes, the field value updates on the host and you can read its value.