NavigationPathQueryResult2D

    Represents the result of a 2D pathfinding query.

    NavigationPathQueryResult2D.swift:11
    class NavigationPathQueryResult2D

    This class stores the result of a 2D navigation path query from the NavigationServer2D.

    Superclasses

    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.

    Types

    Type members

    Instance members

    • var path: PackedVector2Array

      The resulting path array from the navigation query. All path array positions are in global coordinates. Without customized query parameters this is the same path as returned by mapGetPath(map:origin:destination:optimize:navigationLayers:).

    • var pathOwnerIds: PackedInt64Array

      The ObjectIDs of the Objects which manage the regions and links each point of the path goes through.

    • var pathRids: VariantCollection<RID>

      The RIDs of the regions and links that each point of the path goes through.

    • var pathTypes: PackedInt32Array

      The type of navigation primitive (region or link) that each point of the path goes through.

    • func reset()

      Reset the result object to its initial state. This is useful to reuse the object across multiple queries.