Skip to content

Zoom, pan and pick on a top-down map

Updated

An Orthographic Camera looks straight down on a little town, with no perspective: the mouse wheel changes its size, the height of the view, the arrow keys move it across the map, and a click selects a house, shown with an animated outline.

Turn the mouse wheel over the map to zoom between 5 and 60 m of view height. Click a house to select it, then hold the arrow keys to move across the map.

Zoom, pan and pick on a top-down map

The script is explained step by step in Zoom, pan and pick on a top-down map.

Download the project file below, then import it in XR Hub with Projects › New › Import, as described in Projects and templates. It opens in XR Creator with the same scene you see running above, each script already attached to its Behavior entity. From there you can edit the scripts, adjust components and their props, preview your changes, and deploy the result as a world of your own.

MapZoom.xrproj