distanceLimit
TypeScriptget distanceLimit(): SDKHandleSwift declarationvar distanceLimit: ClosedRange<Float>Specifies the minimum and maximum allowed distance between the pins.
struct · iOS 18.0+ · SDK 27.1
struct PhysicsDistanceJointA joint that maintains a minimum and maximum distance between two entity pins. A distance joint restricts the distance between ``pin0`` and ``pin1``. The joint determines this closed range according to ``distanceLimit``. This joint allows full rotational freedom between ``pin0`` and ``pin1``.
get distanceLimit(): SDKHandleSwift declarationvar distanceLimit: ClosedRange<Float>Specifies the minimum and maximum allowed distance between the pins.
set distanceLimit(value: SDKHandle)Swift declarationvar distanceLimit: ClosedRange<Float>Specifies the minimum and maximum allowed distance between the pins.
get checksForInternalCollisions(): booleanSwift declarationvar checksForInternalCollisions: BoolA Boolean that indicates whether the joint checks and reports collisions between the two entity instances. - Note: This does not affect how collisions of the two entities referenced in ``pin0`` and ``pin1`` interact with other entities.
set checksForInternalCollisions(value: boolean)Swift declarationvar checksForInternalCollisions: BoolA Boolean that indicates whether the joint checks and reports collisions between the two entity instances. - Note: This does not affect how collisions of the two entities referenced in ``pin0`` and ``pin1`` interact with other entities.
static init(pin0: GeometricPin, pin1: GeometricPin, distanceLimit: SDKHandle, checksForInternalCollisions?: boolean): PhysicsDistanceJointSwift declarationinit(pin0: GeometricPin, pin1: GeometricPin, distanceLimit: ClosedRange<Float>, checksForInternalCollisions: Bool = false)Creates a new distance joint. - Parameters: - pin0: The local position and orientation on the first entity. - pin1: The local position and orientation on the second entity. - distanceLimit: Specifies the minimum and maximum allowed distance between the two pins. - checksForInternalCollisions: A Boolean that indicates whether the joint checks for collisions between the two ``Entity`` instances.
get pin0(): GeometricPinSwift declarationvar pin0: GeometricPinThe pin that defines a local position and orientation on the first entity.
set pin0(value: GeometricPin)Swift declarationvar pin0: GeometricPinThe pin that defines a local position and orientation on the first entity.
get pin1(): GeometricPinSwift declarationvar pin1: GeometricPinThe pin that defines a local position and orientation on the second entity.
set pin1(value: GeometricPin)Swift declarationvar pin1: GeometricPinThe pin that defines a local position and orientation on the second entity.
get isActive(): booleanSwift declarationvar isActive: Bool { get }A Boolean that indicates whether the joint is active. Inactive joints do not participate in the physics simulation. One example is a joint that does not reference any ``Entity`` with ``PhysicsBodyMode/dynamic``, or when one or both the referenced entities are not active.
get tolerance(): numberSwift declarationvar tolerance: FloatAn extension of the distance limit, as a percentage-based error tolerance. For example, a tolerance of `0.01` extends the distance limit by `1` percent. When the pins exceed this distance, the joint constrains the pins until they are within the distance limit. - Important: Use a non-negative value for the tolerance.
set tolerance(value: number)Swift declarationvar tolerance: FloatAn extension of the distance limit, as a percentage-based error tolerance. For example, a tolerance of `0.01` extends the distance limit by `1` percent. When the pins exceed this distance, the joint constrains the pins until they are within the distance limit. - Important: Use a non-negative value for the tolerance.
No declarations were skipped in this snapshot.