Returns a Vector2 that is half the screen's current width and height.
Debug.Log(CenterOfScreen);Raycast from Vector2 screen point. Returns true if raycast collides with a plane. Also returns collision Pose and ARPlane.
if (RaycastToPlane(CenterOfScreen, raycastManager, planeManager, out var pose, out var plane)) {
Debug.Log(pose.position);
Debug.Log(plane.alignment);
}Raycast from center of screen. Returns true if raycast collides with a plane. Optionally returns collision Pose and ARPlane.
if (IsLookingAtPlane(raycastManager, planeManager, out var pose, out var plane)) {
Debug.Log("Plane is visible (and in the center of the screen).");
}if (IsLookingAtPlane(raycastManager, planeManager, out var pose)) {
Debug.Log("Plane is visible (and in the center of the screen).");
}if (IsLookingAtPlane(raycastManager, planeManager)) {
Debug.Log("Plane is visible (and in the center of the screen).");
}Raycast from input position of screen. Returns true if raycast collides with a plane. Optionally returns collision Pose and ARPlane.
if (HasTouchedPlane(raycastManager, planeManager, out var pose, out var plane)) {
Debug.Log("Plane has been touched.");
}if (HasTouchedPlane(raycastManager, planeManager, out var pose)) {
Debug.Log("Plane has been touched.");
}if (HasTouchedPlane(raycastManager, planeManager)) {
Debug.Log("Plane has been touched.");
}Disables/enables all ARPlane gameObjects.
planeManager.SetActiveStateOfPlaneVisuals(false); // disables ARPlane gameObjectsplaneManager.SetActiveStateOfPlaneVisuals(true); // enables ARPlane gameObjects