Stay organized with collections Save and categorize content based on your preferences.

Google.XR.ARCoreExtensions.AREarthManager

Provides localization in Earth-relative coordinates.

Summary

ARCoreExtensionsConfig.GeospatialMode must be GeospatialMode.Enabled in order to make use of the Geospatial API. Not all devices support GeospatialMode.Enabled, use AREarthManager.IsGeospatialModeSupported to find whether the current device supports enabling this mode.

AREarthManager.CameraGeospatialPose should only be used when AREarthManager.EarthTrackingState is TrackingState.Tracking, and otherwise should not be used. If the EarthTrackingState does not become Tracking, then AREarthManager.EarthState may contain more information on this failure.

Inheritance

Inherits from: UnityEngine::MonoBehaviour

Properties

CameraGeospatialPose
Gets the GeospatialPose for the camera in the latest frame, describing the geodedic position of the device.
EarthState
Gets the EarthState for the latest frame.
EarthTrackingState
Gets the tracking state of Earth for the latest frame.

Public functions

IsGeospatialModeSupported(GeospatialMode mode)
Checks whether the provided GeospatialMode is supported on this device.

Properties

CameraGeospatialPose

GeospatialPose CameraGeospatialPose

Gets the GeospatialPose for the camera in the latest frame, describing the geodedic position of the device.

The position of the pose is located at the device's camera, while the orientation closely approximates the orientation of the display.

Note: This pose is only valid when EarthTrackingState is TrackingState.Tracking; otherwise, it should not be used.

EarthState

EarthState EarthState

Gets the EarthState for the latest frame.

EarthTrackingState

TrackingState EarthTrackingState

Gets the tracking state of Earth for the latest frame.

Public functions

IsGeospatialModeSupported

FeatureSupported IsGeospatialModeSupported(
  GeospatialMode mode
)

Checks whether the provided GeospatialMode is supported on this device.

The current list of supported devices is documented on the ARCore supported devices page. A device may be incompatible with a given mode due to insufficient sensor capabilities.

Details
Parameters
mode
The desired geospatial mode.
Returns
Indicates whether the given mode is supported on this device. It will return FeatureSupported.Unknown if the session is still under initialization.