:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/../../GodotApplePlugins/doc_classes/ARRaycastResult.xml. .. _class_ARRaycastResult: ARRaycastResult =============== **Inherits:** :ref:`RefCounted` **<** :ref:`Object` Contains the result of an AR raycast, including the hit transform and target surface. .. rst-class:: classref-introduction-group Description ----------- Returned by :ref:`ARSession.raycast()`. Contains the world transform of the hit point, the type of surface hit, and an optional anchor reference. **iOS only.** On visionOS/macOS this type exists for API consistency but is never populated with real data. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +---------------------------------------+--------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`ARAnchor` | :ref:`anchor` | ``null`` | +---------------------------------------+--------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`int` | :ref:`target` | ``1`` | +---------------------------------------+--------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`int` | :ref:`target_alignment` | ``2`` | +---------------------------------------+--------------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`Transform3D` | :ref:`world_transform` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | +---------------------------------------+--------------------------------------------------------------------------+-----------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Enumerations ------------ .. _enum_ARRaycastResult_Target: .. rst-class:: classref-enumeration enum **Target**: :ref:`🔗` .. _class_ARRaycastResult_constant_EXISTING_PLANE_GEOMETRY: .. rst-class:: classref-enumeration-constant :ref:`Target` **EXISTING_PLANE_GEOMETRY** = ``1`` The hit came from existing plane geometry. .. _class_ARRaycastResult_constant_EXISTING_PLANE_INFINITE: .. rst-class:: classref-enumeration-constant :ref:`Target` **EXISTING_PLANE_INFINITE** = ``2`` The hit came from an infinite extension of an existing plane. .. _class_ARRaycastResult_constant_ESTIMATED_PLANE: .. rst-class:: classref-enumeration-constant :ref:`Target` **ESTIMATED_PLANE** = ``3`` The hit came from an estimated plane. .. rst-class:: classref-item-separator ---- .. _enum_ARRaycastResult_TargetAlignment: .. rst-class:: classref-enumeration enum **TargetAlignment**: :ref:`🔗` .. _class_ARRaycastResult_constant_HORIZONTAL: .. rst-class:: classref-enumeration-constant :ref:`TargetAlignment` **HORIZONTAL** = ``0`` The hit surface is horizontally aligned. .. _class_ARRaycastResult_constant_VERTICAL: .. rst-class:: classref-enumeration-constant :ref:`TargetAlignment` **VERTICAL** = ``1`` The hit surface is vertically aligned. .. _class_ARRaycastResult_constant_ANY: .. rst-class:: classref-enumeration-constant :ref:`TargetAlignment` **ANY** = ``2`` The hit surface alignment was not restricted. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ARRaycastResult_property_anchor: .. rst-class:: classref-property :ref:`ARAnchor` **anchor** = ``null`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_anchor**\ (\ value\: :ref:`ARAnchor`\ ) - :ref:`ARAnchor` **get_anchor**\ (\ ) The anchor associated with the hit result, if any. .. rst-class:: classref-item-separator ---- .. _class_ARRaycastResult_property_target: .. rst-class:: classref-property :ref:`int` **target** = ``1`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_target**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_target**\ (\ ) The surface type that was hit. See :ref:`Target`. .. rst-class:: classref-item-separator ---- .. _class_ARRaycastResult_property_target_alignment: .. rst-class:: classref-property :ref:`int` **target_alignment** = ``2`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_target_alignment**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_target_alignment**\ (\ ) The alignment of the matched surface. See :ref:`TargetAlignment`. .. rst-class:: classref-item-separator ---- .. _class_ARRaycastResult_property_world_transform: .. rst-class:: classref-property :ref:`Transform3D` **world_transform** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_world_transform**\ (\ value\: :ref:`Transform3D`\ ) - :ref:`Transform3D` **get_world_transform**\ (\ ) The hit transform in world space. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`