InputEventScreenDrag

    Represents a screen drag event.

    InputEventScreenDrag.swift:17
    class InputEventScreenDrag

    Stores information about screen drag events. See _input(event:).

    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.

    Type members

    Instance members

    • var index: Int32

      The drag event index in the case of a multi-drag event.

    • var penInverted: Bool

      Returns true when using the eraser end of a stylus pen.

    • var position: Vector2

      The drag position in the viewport the node is in, using the coordinate system of this viewport.

    • var pressure: Double

      Represents the pressure the user puts on the pen. Ranges from 0.0 to 1.0.

    • var relative: Vector2

      The drag position relative to the previous position (position at the last frame).

    • var screenRelative: Vector2

      The unscaled drag position relative to the previous position in screen coordinates (position at the last frame). This position is not scaled according to the content scale factor or calls to xformedBy(xform:localOfs:). This should be preferred over relative for touch aiming regardless of the project’s stretch mode.

    • var screenVelocity: Vector2

      The unscaled drag velocity in pixels per second in screen coordinates. This velocity is not scaled according to the content scale factor or calls to xformedBy(xform:localOfs:). This should be preferred over velocity for touch aiming regardless of the project’s stretch mode.

    • var tilt: Vector2

      Represents the angles of tilt of the pen. Positive X-coordinate value indicates a tilt to the right. Positive Y-coordinate value indicates a tilt toward the user. Ranges from -1.0 to 1.0 for both axes.

    • var velocity: Vector2

      The drag velocity.