PhysicsDirectBodyState2DExtension
Provides virtual methods that can be overridden to create custom PhysicsDirectBodyState2D
implementations.
class PhysicsDirectBodyState2DExtension
This class extends PhysicsDirectBodyState2D
by providing additional virtual methods that can be overridden. When these methods are overridden, they will be called instead of the internal methods of the physics server.
Intended for use with GDExtension to create custom implementations of PhysicsDirectBodyState2D
.
Superclasses
class PhysicsDirectBodyState2D
Provides direct access to a physics body in the
PhysicsServer2D
.
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 exampleGString
,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
Show implementation details (44)
Hide implementation details
func _addConstantCentralForce(Vector2
) Overridable version of
addConstantCentralForce(_:)
.func _addConstantForce(Vector2, position: Vector2
) Overridable version of
addConstantForce(_:position:)
.func _addConstantTorque(Double
) Overridable version of
addConstantTorque(_:)
.func _applyCentralForce(Vector2
) Overridable version of
applyCentralForce(_:)
.func _applyCentralImpulse(Vector2
) Overridable version of
applyCentralImpulse(_:)
.func _applyForce(Vector2, position: Vector2
) Overridable version of
applyForce(_:position:)
.func _applyImpulse(Vector2, position: Vector2
) Overridable version of
applyImpulse(_:position:)
.func _applyTorque(Double
) Overridable version of
applyTorque(_:)
.func _applyTorqueImpulse(Double
) Overridable version of
applyTorqueImpulse(_:)
.func _getAngularVelocity(
) -> Double Implement to override the behavior of
angularVelocity
and its respective getter.func _getCenterOfMass(
) -> Vector2 Implement to override the behavior of
centerOfMass
and its respective getter.func _getCenterOfMassLocal(
) -> Vector2 Implement to override the behavior of
centerOfMassLocal
and its respective getter.func _getConstantForce(
) -> Vector2 Overridable version of
getConstantForce
.func _getConstantTorque(
) -> Double Overridable version of
getConstantTorque
.func _getContactCollider(contactIdx: Int32
) -> RID Overridable version of
getContactCollider(contactIdx:)
.func _getContactColliderId(contactIdx: Int32
) -> UInt Overridable version of
getContactColliderId(contactIdx:)
.func _getContactColliderObject(contactIdx: Int32
) -> Object? Overridable version of
getContactColliderObject(contactIdx:)
.func _getContactColliderPosition(contactIdx: Int32
) -> Vector2 Overridable version of
getContactColliderPosition(contactIdx:)
.func _getContactColliderShape(contactIdx: Int32
) -> Int32 Overridable version of
getContactColliderShape(contactIdx:)
.func _getContactColliderVelocityAtPosition(contactIdx: Int32
) -> Vector2 Overridable version of
getContactColliderVelocityAtPosition(contactIdx:)
.func _getContactCount(
) -> Int32 Overridable version of
getContactCount
.func _getContactImpulse(contactIdx: Int32
) -> Vector2 Overridable version of
getContactImpulse(contactIdx:)
.func _getContactLocalNormal(contactIdx: Int32
) -> Vector2 Overridable version of
getContactLocalNormal(contactIdx:)
.func _getContactLocalPosition(contactIdx: Int32
) -> Vector2 Overridable version of
getContactLocalPosition(contactIdx:)
.func _getContactLocalShape(contactIdx: Int32
) -> Int32 Overridable version of
getContactLocalShape(contactIdx:)
.func _getContactLocalVelocityAtPosition(contactIdx: Int32
) -> Vector2 Overridable version of
getContactLocalVelocityAtPosition(contactIdx:)
.func _getInverseInertia(
) -> Double Implement to override the behavior of
inverseInertia
and its respective getter.func _getInverseMass(
) -> Double Implement to override the behavior of
inverseMass
and its respective getter.func _getLinearVelocity(
) -> Vector2 Implement to override the behavior of
linearVelocity
and its respective getter.func _getSpaceState(
) -> PhysicsDirectSpaceState2D? Overridable version of
getSpaceState
.func _getStep(
) -> Double Implement to override the behavior of
step
and its respective getter.func _getTotalAngularDamp(
) -> Double Implement to override the behavior of
totalAngularDamp
and its respective getter.func _getTotalGravity(
) -> Vector2 Implement to override the behavior of
totalGravity
and its respective getter.func _getTotalLinearDamp(
) -> Double Implement to override the behavior of
totalLinearDamp
and its respective getter.func _getTransform(
) -> Transform2D Implement to override the behavior of
transform
and its respective getter.func _getVelocityAtLocalPosition(Vector2
) -> Vector2 Overridable version of
getVelocityAtLocalPosition(_:)
.func _integrateForces(
) Overridable version of
integrateForces
.func _isSleeping(
) -> Bool Implement to override the behavior of
sleeping
and its respective getter.func _setAngularVelocity(Double
) Implement to override the behavior of
angularVelocity
and its respective setter.func _setConstantForce(Vector2
) Overridable version of
setConstantForce(_:)
.func _setConstantTorque(Double
) Overridable version of
setConstantTorque(_:)
.func _setLinearVelocity(Vector2
) Implement to override the behavior of
linearVelocity
and its respective setter.func _setSleepState(enabled: Bool
) Implement to override the behavior of
sleeping
and its respective setter.func _setTransform(Transform2D
) Implement to override the behavior of
transform
and its respective setter.