RayCast3D

    A ray in 3D space, used to find the first CollisionObject3D it intersects.

    RayCast3D.swift:18
    class RayCast3D

    A raycast represents a ray from its origin to its targetPosition that finds the closest CollisionObject3D along its path, if it intersects any. This is useful for a lot of things, such as

    RayCast3D can ignore some objects by adding them to an exception list, by making its detection reporting ignore Area3Ds (collideWithAreas) or PhysicsBody3Ds (collideWithBodies), or by configuring physics layers.

    RayCast3D calculates intersection every physics frame, and it holds the result until the next physics frame. For an immediate raycast, or if you want to configure a RayCast3D multiple times within the same physics frame, use forceRaycastUpdate.

    To sweep over a region of 3D space, you can approximate the region with multiple RayCast3Ds or use ShapeCast3D.

    Superclasses

    • class Node3D

      Most basic 3D game object, parent of all 3D-related nodes.

    Citizens in SwiftGodot

    Conformances

    • protocol CustomStringConvertible

      A type with a customized textual representation.

    • protocol Equatable

      A type that can be compared for value equality.

    • protocol Hashable

      A type that can be hashed into a Hasher to produce an integer hash value.

    • protocol Identifiable<ID>

      A class of types whose instances hold the value of an entity with stable identity.

    • protocol VariantRepresentable

      Types that conform to VariantRepresentable can be stored directly in Variant with no conversion. These include all of the Variant types from Godot (for example GString, Rect, Plane), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.

    • protocol VariantStorable

      Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.

    Type members

    Instance members