Main Content


Create viewport for world

Since R2022b


    createViewport(world) creates a viewport with a single field, Main that contains a sim3d.sensors.MainCamera object.

    If you do not create a viewport, then the point of view is set to 0, 0 ,0, and you can use the arrow keys and pointer to navigate in the game.

    Input Arguments

    collapse all

    World where viewport is added, specified as a sim3d.World object. You can view the fields in the structure from the Viewports property of the sim3d.World object.

    Version History

    Introduced in R2022b