Creating Viewport Helpers

You can create a viewport helper.

A viewport helper is a scripted actor related to the dimensions of your experience viewport. Therefore, the viewport helper consists of a logical actor including a script (named ViewportHelper) that you can configure and edit using the Behavior Editor.

Note: The term viewport refers to the 3D viewport of your experience that includes only the 3D area and not the whole app window.

The viewport helper has associated sensors that you can use in your Natural Language scenarios and modify through the editing of the viewport helper script. Those sensors let you specify reference points.

You can then use these points to determine how your experience and its content act when the size of the viewport stands between a specific range of resolutions. For example, you can define the visibility of an actor depending on the current size of the viewport.

This enables you to configure precisely the layout and behavior of your experience for different screen formats, which enhances the responsiveness of your experience.

See Also
Viewport Helper Properties
Managing Scripted Actors
  1. From the Storytelling section of the action bar, click Create Viewport Helper .

    You create and instantiate a viewport helper (with its associated script and sensors) under the Logic node of the Project panel.

    The viewport helper does not appear in the 3D area and does not have any 3D visual representation.

  2. In the Behavior Editor, edit and configure the script of your viewport helper.

    • You can read and edit the script associated with the viewport helper to extend the functionalities of this script.
    • You can expose the sensors associated with the viewport helper in your Natural Language scenarios.
    • You can compare the current dimensions of the main viewport with a given value using the sensors.

    Notes:
    • The viewport helper sensors are available in Play mode in Creative Experience, in 3DPlay, and in the web player after a publication to the web.
    • You can directly configure and adapt the code structure of the viewport helper script to suit your requirements.
    • The created viewport helper does not get updated automatically with the progress of new releases. To update a viewport helper, recreate it.