Screen-based UI for mobile and web
This system is limited and is not the best tool for building a user interface, as it uses non-interactive meshes that aren’t optimized for rendering interfaces. If you have access to advanced tooling (for example if you are a member of MHCP), we strongly recommend that you use Custom UI to create dynamic, interactive and compelling interfaces in your worlds. See the
Custom UI docs to learn more.
You can selectively move entities attached to the player a set distance in front of the camera when playing on web and mobile devices. You can do this by enabling the Attach to 2D Screen property. This property is only displayed when Anchor To is set.
This image is taken from the Desktop Editor, but the same functionality is available in the Properties panel for entities in VR build mode. The Desktop Editor is only available to creators with access to advanced tooling.
Enabling the Attach to 2D Screen option reveals additional settings that help you position the entity on the screen.
This image is taken from the Desktop Editor, but the same functionality is available in the Properties panel for entities in VR build mode. The Desktop Editor is only available to creators with access to advanced tooling.
- The position [0,0,0] is at the center of the screen.
- The position [-1,-1,0] is at the bottom left corner of the screen.
- The position [1,1,0] is at the top right corner of the screen.
- Increasing the Z value of the position moves the entity farther away from the camera.
- The 2D attachment only takes effect when the entity is attached to a player.