GoogleARCore.Frame

Provides a snapshot of the state of ARCore at a specific timestamp associated with the current frame.

Summary

Frame holds information about ARCore's state including tracking status, the pose of the camera relative to the world, estimated lighting parameters, and information on updates to objects (like Planes or Point Clouds) that ARCore is tracking.

Properties

LightEstimate
static LightEstimate
Gets the current light estimate for this frame.
Pose
static Pose
Gets the pose of the ARCore device for the frame in Unity world coordinates.

Public static functions

Raycast(float x, float y, TrackableHitFlags filter, out TrackableHit hitResult)
bool
Performs a raycast against physical objects being tracked by ARCore.
RaycastAll(float x, float y, TrackableHitFlags filter, List< TrackableHit > hitResults)
bool
Performs a raycast against physical objects being tracked by ARCore.

Classes

GoogleARCore.Frame.CameraImage

Container for state related to the ARCore camera for the frame.

GoogleARCore.Frame.CameraMetadata

Container for state related to the ARCore camera image metadata for the Frame.

GoogleARCore.Frame.PointCloud

Container for state related to the ARCore point cloud for the Frame.

Properties

LightEstimate

static LightEstimate LightEstimate

Gets the current light estimate for this frame.

Pose

static Pose Pose

Gets the pose of the ARCore device for the frame in Unity world coordinates.

Public static functions

Raycast

bool Raycast(
  float x,
  float y,
  TrackableHitFlags filter,
  out TrackableHit hitResult
)

Performs a raycast against physical objects being tracked by ARCore.

Output the closest hit from the camera. Note that the Unity's screen coordinate (0, 0) starts from bottom left.

Details
Parameters
x
Horizontal touch position in Unity's screen coordiante.
y
Vertical touch position in Unity's screen coordiante.
filter
A filter bitmask where each set bit in TrackableHitFlags represents a category of raycast hits the method call should consider valid.
hitResult
A TrackableHit that will be set if the raycast is successful.
Returns
true if the raycast had a hit, otherwise false.

RaycastAll

bool RaycastAll(
  float x,
  float y,
  TrackableHitFlags filter,
  List< TrackableHit > hitResults
)

Performs a raycast against physical objects being tracked by ARCore.

Output all hits from the camera. Note that the Unity's screen coordinate (0, 0) starts from bottom left.

Details
Parameters
x
Horizontal touch position in Unity's screen coordiante.
y
Vertical touch position in Unity's screen coordiante.
filter
A filter bitmask where each set bit in TrackableHitFlags represents a category of raycast hits the method call should consider valid.
hitResults
A list of TrackableHit that will be set if the raycast is successful.
Returns
true if the raycast had a hit, otherwise false.

Send feedback about...