GoogleARCore. InstantPlacementPoint
Trackable Instant Placement point returned by Frame.RaycastInstantPlacement(float, float, float, TrackableHit).
Summary
If ARCore has an accurate 3D pose for the InstantPlacementPoint
returned by Frame.RaycastInstantPlacement(float, float, float, TrackableHit)
it will start with tracking method InstantPlacementPointTrackingMethod
.FullTracking
. Otherwise, it will start with tracking method InstantPlacementPointTrackingMethod.ScreenspaceWithApproximateDistance
, and will transition to InstantPlacementPointTrackingMethod
.FullTracking
once ARCore has an accurate 3D pose. Once the tracking method is InstantPlacementPointTrackingMethod
.FullTracking
it will not revert to InstantPlacementPointTrackingMethod.ScreenspaceWithApproximateDistance
.
When the tracking method changes from InstantPlacementPointTrackingMethod.ScreenspaceWithApproximateDistance
in one frame to InstantPlacementPointTrackingMethod
.FullTracking
in the next frame, the pose will jump from its initial location based on the provided approximate distance to a new location at an accurate distance.
This instantaneous change in pose will change the apparent scale of any objects that are anchored to the InstantPlacementPoint
. That is, an object will suddenly appear larger or smaller than it was in the previous frame.
To avoid the visual jump due to the sudden change in apparent object scale, use the following procedure:
- Keep track of the pose and tracking method of the
InstantPlacementPoint
in each frame. - Wait for the tracking method to change to
InstantPlacementPointTrackingMethod
.FullTracking
. - Use the pose from the previous frame and the pose in the current frame to determine the object's distance to the device in both frames.
- Calculate the apparent change in scale due to the change in distance from the camera.
- Adjust the scale of the object to counteract the perceived change in scale, so that visually the object does not appear to change in size.
- Optionally, smoothly adjust the scale of the object back to its original value over several frames.
Inheritance
Inherits from: GoogleARCore.Trackable
Properties |
|
---|---|
Pose
|
Pose
Gets the pose of the InstantPlacementPoint.
|
TrackingMethod
|
Gets the tracking method of the InstantPlacementPoint.
|
Properties
TrackingMethod
InstantPlacementPointTrackingMethod TrackingMethod
Gets the tracking method of the InstantPlacementPoint.