PhysicsServer2DExtension
Provides virtual methods that can be overridden to create custom PhysicsServer2D
implementations.
class PhysicsServer2DExtension
This class extends PhysicsServer2D
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 PhysicsServer2D
.
Superclasses
class PhysicsServer2D
A server interface for low-level 2D physics access.
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 (135)
Hide implementation details
func _areaAddShape(area: RID, shape: RID, transform: Transform2D, disabled: Bool
) func _areaAttachCanvasInstanceId(area: RID, id: UInt
) func _areaAttachObjectInstanceId(area: RID, id: UInt
) func _areaClearShapes(area: RID
) func _areaCreate(
) -> RID func _areaGetCanvasInstanceId(area: RID
) -> UInt func _areaGetCollisionLayer(area: RID
) -> UInt32 func _areaGetCollisionMask(area: RID
) -> UInt32 func _areaGetObjectInstanceId(area: RID
) -> UInt func _areaGetParam(area: RID, param: PhysicsServer2D.AreaParameter
) -> Variant func _areaGetShape(area: RID, shapeIdx: Int32
) -> RID func _areaGetShapeCount(area: RID
) -> Int32 func _areaGetShapeTransform(area: RID, shapeIdx: Int32
) -> Transform2D func _areaGetSpace(area: RID
) -> RID func _areaGetTransform(area: RID
) -> Transform2D func _areaRemoveShape(area: RID, shapeIdx: Int32
) func _areaSetAreaMonitorCallback(area: RID, callback: Callable
) func _areaSetCollisionLayer(area: RID, layer: UInt32
) func _areaSetCollisionMask(area: RID, mask: UInt32
) func _areaSetMonitorCallback(area: RID, callback: Callable
) func _areaSetMonitorable(area: RID, monitorable: Bool
) func _areaSetParam(area: RID, param: PhysicsServer2D.AreaParameter, value: Variant
) func _areaSetPickable(area: RID, pickable: Bool
) func _areaSetShape(area: RID, shapeIdx: Int32, shape: RID
) func _areaSetShapeDisabled(area: RID, shapeIdx: Int32, disabled: Bool
) func _areaSetShapeTransform(area: RID, shapeIdx: Int32, transform: Transform2D
) func _areaSetSpace(area: RID, space: RID
) func _areaSetTransform(area: RID, transform: Transform2D
) func _bodyAddCollisionException(body: RID, exceptedBody: RID
) func _bodyAddConstantCentralForce(body: RID, force: Vector2
) func _bodyAddConstantForce(body: RID, force: Vector2, position: Vector2
) func _bodyAddConstantTorque(body: RID, torque: Double
) func _bodyAddShape(body: RID, shape: RID, transform: Transform2D, disabled: Bool
) func _bodyApplyCentralForce(body: RID, force: Vector2
) func _bodyApplyCentralImpulse(body: RID, impulse: Vector2
) func _bodyApplyForce(body: RID, force: Vector2, position: Vector2
) func _bodyApplyImpulse(body: RID, impulse: Vector2, position: Vector2
) func _bodyApplyTorque(body: RID, torque: Double
) func _bodyApplyTorqueImpulse(body: RID, impulse: Double
) func _bodyAttachCanvasInstanceId(body: RID, id: UInt
) func _bodyAttachObjectInstanceId(body: RID, id: UInt
) func _bodyClearShapes(body: RID
) func _bodyCreate(
) -> RID func _bodyGetCanvasInstanceId(body: RID
) -> UInt func _bodyGetCollisionExceptions(body: RID
) -> VariantCollection<RID> func _bodyGetCollisionLayer(body: RID
) -> UInt32 func _bodyGetCollisionMask(body: RID
) -> UInt32 func _bodyGetCollisionPriority(body: RID
) -> Double func _bodyGetConstantForce(body: RID
) -> Vector2 func _bodyGetConstantTorque(body: RID
) -> Double func _bodyGetContactsReportedDepthThreshold(body: RID
) -> Double func _bodyGetContinuousCollisionDetectionMode(body: RID
) -> PhysicsServer2D.CCDMode func _bodyGetDirectState(body: RID
) -> PhysicsDirectBodyState2D? func _bodyGetMaxContactsReported(body: RID
) -> Int32 func _bodyGetMode(body: RID
) -> PhysicsServer2D.BodyMode func _bodyGetObjectInstanceId(body: RID
) -> UInt func _bodyGetParam(body: RID, param: PhysicsServer2D.BodyParameter
) -> Variant func _bodyGetShape(body: RID, shapeIdx: Int32
) -> RID func _bodyGetShapeCount(body: RID
) -> Int32 func _bodyGetShapeTransform(body: RID, shapeIdx: Int32
) -> Transform2D func _bodyGetSpace(body: RID
) -> RID func _bodyGetState(body: RID, state: PhysicsServer2D.BodyState
) -> Variant func _bodyIsOmittingForceIntegration(body: RID
) -> Bool func _bodyRemoveCollisionException(body: RID, exceptedBody: RID
) func _bodyRemoveShape(body: RID, shapeIdx: Int32
) func _bodyResetMassProperties(body: RID
) func _bodySetAxisVelocity(body: RID, axisVelocity: Vector2
) func _bodySetCollisionLayer(body: RID, layer: UInt32
) func _bodySetCollisionMask(body: RID, mask: UInt32
) func _bodySetCollisionPriority(body: RID, priority: Double
) func _bodySetConstantForce(body: RID, force: Vector2
) func _bodySetConstantTorque(body: RID, torque: Double
) func _bodySetContactsReportedDepthThreshold(body: RID, threshold: Double
) func _bodySetContinuousCollisionDetectionMode(body: RID, mode: PhysicsServer2D.CCDMode
) func _bodySetForceIntegrationCallback(body: RID, callable: Callable, userdata: Variant
) func _bodySetMaxContactsReported(body: RID, amount: Int32
) func _bodySetMode(body: RID, mode: PhysicsServer2D.BodyMode
) func _bodySetOmitForceIntegration(body: RID, enable: Bool
) func _bodySetParam(body: RID, param: PhysicsServer2D.BodyParameter, value: Variant
) func _bodySetPickable(body: RID, pickable: Bool
) func _bodySetShape(body: RID, shapeIdx: Int32, shape: RID
) func _bodySetShapeAsOneWayCollision(body: RID, shapeIdx: Int32, enable: Bool, margin: Double
) func _bodySetShapeDisabled(body: RID, shapeIdx: Int32, disabled: Bool
) func _bodySetShapeTransform(body: RID, shapeIdx: Int32, transform: Transform2D
) func _bodySetSpace(body: RID, space: RID
) func _bodySetState(body: RID, state: PhysicsServer2D.BodyState, value: Variant
) func _bodySetStateSyncCallback(body: RID, callable: Callable
) func _capsuleShapeCreate(
) -> RID func _circleShapeCreate(
) -> RID func _concavePolygonShapeCreate(
) -> RID func _convexPolygonShapeCreate(
) -> RID func _dampedSpringJointGetParam(joint: RID, param: PhysicsServer2D.DampedSpringParam
) -> Double func _dampedSpringJointSetParam(joint: RID, param: PhysicsServer2D.DampedSpringParam, value: Double
) func _endSync(
) func _finish(
) func _flushQueries(
) func _freeRid(RID
) func _getProcessInfo(PhysicsServer2D.ProcessInfo
) -> Int32 func _init(
) func _isFlushingQueries(
) -> Bool func _jointClear(joint: RID
) func _jointCreate(
) -> RID func _jointDisableCollisionsBetweenBodies(joint: RID, disable: Bool
) func _jointGetParam(joint: RID, param: PhysicsServer2D.JointParam
) -> Double func _jointGetType(joint: RID
) -> PhysicsServer2D.JointType func _jointIsDisabledCollisionsBetweenBodies(joint: RID
) -> Bool func _jointMakeDampedSpring(joint: RID, anchorA: Vector2, anchorB: Vector2, bodyA: RID, bodyB: RID
) func _jointMakeGroove(joint: RID, aGroove1: Vector2, aGroove2: Vector2, bAnchor: Vector2, bodyA: RID, bodyB: RID
) func _jointMakePin(joint: RID, anchor: Vector2, bodyA: RID, bodyB: RID
) func _jointSetParam(joint: RID, param: PhysicsServer2D.JointParam, value: Double
) func _pinJointGetFlag(joint: RID, flag: PhysicsServer2D.PinJointFlag
) -> Bool func _pinJointGetParam(joint: RID, param: PhysicsServer2D.PinJointParam
) -> Double func _pinJointSetFlag(joint: RID, flag: PhysicsServer2D.PinJointFlag, enabled: Bool
) func _pinJointSetParam(joint: RID, param: PhysicsServer2D.PinJointParam, value: Double
) func _rectangleShapeCreate(
) -> RID func _segmentShapeCreate(
) -> RID func _separationRayShapeCreate(
) -> RID func _setActive(Bool
) func _shapeGetCustomSolverBias(shape: RID
) -> Double func _shapeGetData(shape: RID
) -> Variant func _shapeGetType(shape: RID
) -> PhysicsServer2D.ShapeType func _shapeSetCustomSolverBias(shape: RID, bias: Double
) func _shapeSetData(shape: RID, data: Variant
) func _spaceCreate(
) -> RID func _spaceGetContactCount(space: RID
) -> Int32 func _spaceGetContacts(space: RID
) -> PackedVector2Array func _spaceGetDirectState(space: RID
) -> PhysicsDirectSpaceState2D? func _spaceGetParam(space: RID, param: PhysicsServer2D.SpaceParameter
) -> Double func _spaceIsActive(space: RID
) -> Bool func _spaceSetActive(space: RID, active: Bool
) func _spaceSetDebugContacts(space: RID, maxContacts: Int32
) func _spaceSetParam(space: RID, param: PhysicsServer2D.SpaceParameter, value: Double
) func _step(Double
) func _sync(
) func _worldBoundaryShapeCreate(
) -> RID