Main Content

VR Tracer

(To be removed) Trace trajectory of object in associated virtual scene

VR Tracer will be removed in a future release. For more information, see Version History.

  • VR Tracer block

Libraries:
Simulink 3D Animation

Description

The VR Tracer block allows you to trace the trajectory of an object in the associated virtual scene.

This block creates marker nodes in regular time steps either as children of the specified parent node (Parent node parameter) or at the top level of scene hierarchy (root).

You can specify one of three types of markers:

  • General shape

  • Line segments connecting object positions in every time step

  • Axis-aligned triads for orienting the trajectory in the 3-D space

You can also project traced object positions to a plane or to a point.

Object position input must correspond to the placement of the object in the scene hierarchy. If the traced object resides as a child of a parent object, define the parent object DEF name in the parent node field. If the traced object resides at the top of the scene hierarchy (its position is defined in global scene coordinates), leave this field empty.

The first block input vector determines the position of the marker. The second block input (if enabled by the Marker color selection parameter) represents the marker color. The second or third block input vector (depending on whether the marker color input vector is enabled) specifies the project point coordinates.

To open the Block Parameters dialog box, double-click the block.

Ports

Input

expand all

Object position input corresponding to the placement of the object in the scene hierarchy. If the traced object resides as a child of a parent object, define the parent object name in the Parent node (leave empty for root) parameter.

Data Types: double

Note

This port is enabled when the Marker color selection parameter is set to Block input

Provide the color to be used for the tracer markers as a 3-element vector of R, G, and B values.

Data Types: double

Parameters

expand all

Specify the virtual world file used for the 3D viewer.

Select the node to be traced from the scene hierarchy.

Select a shape from the provided options to mark the signal trace.

Enable this parameter to connect the markers on the traced object's path.

Enable this parameter to place a triad at each marker position. A triad helps you orient the object trajectory in the x-y-z plane.

Specify a 3-element vector that defines the scaling of predefined marker shapes and triads. This parameter allows accommodation for scenes of various sizes.

  • Block input — Disables Marker color parameter and relies on the second block input to define the marker color. Selecting this option enables the second block input, to which you can connect a signal for the marker color.

  • Selected from color list — Enables the Marker color parameter. You can select one color from a list for the marker.

  • Defined as RGB values — Enables Marker color parameter to accept RGB values for the marker color.

Set the tracer marker color from the provided options. This parameter is enabled when you set Marker color selection to Selected from color list.

Set the tracer marker color as a 3-element vector of RGB values, each ranging from 0-255.

Specify the sample time for the block, or specify -1 to inherit the sample time.

Select this check box to ensure that the Simulink® 3D Animation™ Viewer is open during simulation.

Specify whether to display line segments from an object onto a plane to approximate the trajectory of the object.

When the Project positions on a plane parameter is enabled, specify the plane onto which to project the position of the object. The coefficients are in the form ax+by+cz+d=0.

Displays line segments from an object to a point to approximate the trajectory of the object.

  • None — (Default) No projection to a point.

  • Defined in block mask — If you select this option, enter coordinates in the Projection point coordinates edit box.

  • Defined in the block input — If you select this option, specify the coordinates of the point in the output of a block that inputs to the VR Tracer block.

Extended Capabilities

Version History

Introduced in R2008b

collapse all

R2023b: To be removed

The VR Tracer will be removed in a future release. Instead, use sim3d classes and Simulation 3D blocks to interface MATLAB® and Simulink with the Unreal Engine® 3D simulation environment. To get started, see Create 3D Simulations in Unreal Engine Environment.