Click or drag to resize

ARWorldOriginHelper Class

A helper script to set the apparent world origin of ARCore through applying an offset to the ARCoreDevice (and therefore also it's FirstPersonCamera child); this also provides mechanisms to handle resulting changes to ARCore plane positioning and raycasting. This class SHOULD be used when doing any ray casting - especially if cloud anchors and world origin is being used in your app.
Inheritance Hierarchy
SystemObject
  Object
    Component
      Behaviour
        MonoBehaviour
          ASLARWorldOriginHelper

Namespace:  ASL
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
public class ARWorldOriginHelper : MonoBehaviour

The ARWorldOriginHelper type exposes the following members.

Constructors
  NameDescription
Public methodARWorldOriginHelper
Initializes a new instance of the ARWorldOriginHelper class
Top
Methods
  NameDescription
Private method_WorldToAnchorPose
Converts a pose from Unity world space to Anchor-relative space.
Private methodAwake
Called when class first initialized
Public methodStatic memberGetInstance
SIngleton for this class
Public methodRaycast
Helper function to perform an AR Raycast for the user - by default uses TrackableType.PlaneWithinPolygon which is the most common
Public methodSetWorldOrigin
Sets the apparent world origin of ARCore through applying an offset to the ARCoreDevice (and therefore also it's FirstPersonCamera child), so that the Origin of Unity's World Coordinate System coincides with the Anchor. This function needs to be called once the Cloud Anchor is either hosted or resolved.
Private methodStart
Assigns each script manually
Top
Fields
  NameDescription
Public fieldARCoreDeviceTransform
The transform of the ARCore Device.
Private fieldm_AnchorTransform
The Transform of the Anchor object representing the World Origin.
Private fieldStatic memberm_Instance
Private fieldm_IsOriginPlaced
Indicates whether the Origin of the new World Coordinate System, i.e. the Cloud Anchor, was placed.
Top
See Also

Reference