How is the mesh of 1m and 2m in the scene implemented? Is it a material mapping performed by a model? Can you hold down the option key and left mouse button to view how various scene angles are achieved? Thank you very much
How to achieve the scene effect of RealityComposer Pro
Hi @xfck,
To create a mesh that displays text in your scene, similar to the distance labels you mentioned, use MeshResource(extruding:textOptions:extrusionOptions:) and apply the resulting mesh to a ModelEntity (or a ModelComponent).
If you're also trying to create a grid, one approach is to add a large plane with a custom Shader Graph material that draws lines based on the surface's world-space position (for example, wherever the fractional part of its x or z position is close to zero), fading the lines out with distance from the viewer.
To let people orbit the camera around your scene, apply realityViewCameraControls(_:) to your RealityView with the .orbit parameter. If you need more control, such as specific modifier keys or mouse buttons, add an entity with a PerspectiveCameraComponent, handle the input with your own gestures, and update that entity's transform.
Let me know if you have any questions!