PhysicsTestMotionParameters3D

    Provides parameters for bodyTestMotion(body:parameters:result:).

    PhysicsTestMotionParameters3D.swift:11
    class PhysicsTestMotionParameters3D

    By changing various properties of this object, such as the motion, you can configure the parameters for bodyTestMotion(body:parameters:result:).

    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 collideSeparationRay: Bool

      If set to true, shapes of type PhysicsServer3D/ShapeType/shapeSeparationRay are used to detect collisions and can stop the motion. Can be useful when snapping to the ground.

    • var excludeBodies: VariantCollection<RID>

      Optional array of body RID to exclude from collision. Use getRid to get the RID associated with a CollisionObject3D-derived node.

    • var excludeObjects: VariantCollection<Int64>

      Optional array of object unique instance ID to exclude from collision. See getInstanceId.

    • var from: Transform3D

      Transform in global space where the motion should start. Usually set to globalTransform for the current body’s transform.

    • var margin: Double

      Increases the size of the shapes involved in the collision detection.

    • var maxCollisions: Int32

      Maximum number of returned collisions, between 1 and 32. Always returns the deepest detected collisions.

    • var motion: Vector3

      Motion vector to define the length and direction of the motion to test.

    • var recoveryAsCollision: Bool

      If set to true, any depenetration from the recovery phase is reported as a collision; this is used e.g. by CharacterBody3D for improving floor detection during floor snapping.