PhysicsServer2DExtension
Provides virtual methods that can be overridden to create custom PhysicsServer2D implementations.
Provides virtual methods that can be overridden to create custom PhysicsServer2D implementations.
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 ReckfellExtension to create custom implementations of PhysicsServer2D.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
PhysicsServer2DExtensionConstructor
public PhysicsServer2DExtension();Methods137
BodyTestMotionIsExcludingBodybool
public bool BodyTestMotionIsExcludingBody(Rid body);Returns true if the body with the given Rid is being excluded from _body_test_motion. See also ReckfellObject.GetInstanceId.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
boolBodyTestMotionIsExcludingObjectbool
public bool BodyTestMotionIsExcludingObject(ulong @object);Returns true if the object with the given instance ID is being excluded from _body_test_motion. See also ReckfellObject.GetInstanceId.
| Name | Type | Default |
|---|---|---|
object | ulong | — |
bool_AreaAddShapevoid
public virtual void _AreaAddShape(Rid area, Rid shape, Transform2D transform, bool disabled);Overridable version of PhysicsServer2D.AreaAddShape.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
shape | Rid | — |
transform | Transform2D | — |
disabled | bool | — |
_AreaAttachCanvasInstanceIdvoid
public virtual void _AreaAttachCanvasInstanceId(Rid area, ulong id);Overridable version of PhysicsServer2D.AreaAttachCanvasInstanceId.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
id | ulong | — |
_AreaAttachObjectInstanceIdvoid
public virtual void _AreaAttachObjectInstanceId(Rid area, ulong id);Overridable version of PhysicsServer2D.AreaAttachObjectInstanceId.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
id | ulong | — |
_AreaClearShapesvoid
public virtual void _AreaClearShapes(Rid area);Overridable version of PhysicsServer2D.AreaClearShapes.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
_AreaCreateRid
public virtual Rid _AreaCreate();Overridable version of PhysicsServer2D.AreaCreate.
Rid_AreaGetCanvasInstanceIdulong
public virtual ulong _AreaGetCanvasInstanceId(Rid area);Overridable version of PhysicsServer2D.AreaGetCanvasInstanceId.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
ulong_AreaGetCollisionLayeruint
public virtual uint _AreaGetCollisionLayer(Rid area);Overridable version of PhysicsServer2D.AreaGetCollisionLayer.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
uint_AreaGetCollisionMaskuint
public virtual uint _AreaGetCollisionMask(Rid area);Overridable version of PhysicsServer2D.AreaGetCollisionMask.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
uint_AreaGetObjectInstanceIdulong
public virtual ulong _AreaGetObjectInstanceId(Rid area);Overridable version of PhysicsServer2D.AreaGetObjectInstanceId.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
ulong_AreaGetParamVariant
public virtual Variant _AreaGetParam(Rid area, PhysicsServer2D.AreaParameter param);Overridable version of PhysicsServer2D.AreaGetParam.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
param | PhysicsServer2D.AreaParameter | — |
Variant_AreaGetShapeRid
public virtual Rid _AreaGetShape(Rid area, int shapeIdx);Overridable version of PhysicsServer2D.AreaGetShape.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
shapeIdx | int | — |
Rid_AreaGetShapeCountint
public virtual int _AreaGetShapeCount(Rid area);Overridable version of PhysicsServer2D.AreaGetShapeCount.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
int_AreaGetShapeTransformTransform2D
public virtual Transform2D _AreaGetShapeTransform(Rid area, int shapeIdx);Overridable version of PhysicsServer2D.AreaGetShapeTransform.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
shapeIdx | int | — |
Transform2D_AreaGetSpaceRid
public virtual Rid _AreaGetSpace(Rid area);Overridable version of PhysicsServer2D.AreaGetSpace.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
Rid_AreaGetTransformTransform2D
public virtual Transform2D _AreaGetTransform(Rid area);Overridable version of PhysicsServer2D.AreaGetTransform.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
Transform2D_AreaRemoveShapevoid
public virtual void _AreaRemoveShape(Rid area, int shapeIdx);Overridable version of PhysicsServer2D.AreaRemoveShape.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
shapeIdx | int | — |
_AreaSetAreaMonitorCallbackvoid
public virtual void _AreaSetAreaMonitorCallback(Rid area, Callable callback);Overridable version of PhysicsServer2D.AreaSetAreaMonitorCallback.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
callback | Callable | — |
_AreaSetCollisionLayervoid
public virtual void _AreaSetCollisionLayer(Rid area, uint layer);Overridable version of PhysicsServer2D.AreaSetCollisionLayer.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
layer | uint | — |
_AreaSetCollisionMaskvoid
public virtual void _AreaSetCollisionMask(Rid area, uint mask);Overridable version of PhysicsServer2D.AreaSetCollisionMask.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
mask | uint | — |
_AreaSetMonitorCallbackvoid
public virtual void _AreaSetMonitorCallback(Rid area, Callable callback);Overridable version of PhysicsServer2D.AreaSetMonitorCallback.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
callback | Callable | — |
_AreaSetMonitorablevoid
public virtual void _AreaSetMonitorable(Rid area, bool monitorable);Overridable version of PhysicsServer2D.AreaSetMonitorable.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
monitorable | bool | — |
_AreaSetParamvoid
public virtual void _AreaSetParam(Rid area, PhysicsServer2D.AreaParameter param, Variant value);Overridable version of PhysicsServer2D.AreaSetParam.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
param | PhysicsServer2D.AreaParameter | — |
value | Variant | — |
_AreaSetPickablevoid
public virtual void _AreaSetPickable(Rid area, bool pickable);If set to true, allows the area with the given Rid to detect mouse inputs when the mouse cursor is hovering on it.
Overridable version of PhysicsServer2D's internal area_set_pickable method. Corresponds to CollisionObject2D.InputPickable.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
pickable | bool | — |
_AreaSetShapevoid
public virtual void _AreaSetShape(Rid area, int shapeIdx, Rid shape);Overridable version of PhysicsServer2D.AreaSetShape.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
shapeIdx | int | — |
shape | Rid | — |
_AreaSetShapeDisabledvoid
public virtual void _AreaSetShapeDisabled(Rid area, int shapeIdx, bool disabled);Overridable version of PhysicsServer2D.AreaSetShapeDisabled.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
shapeIdx | int | — |
disabled | bool | — |
_AreaSetShapeTransformvoid
public virtual void _AreaSetShapeTransform(Rid area, int shapeIdx, Transform2D transform);Overridable version of PhysicsServer2D.AreaSetShapeTransform.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
shapeIdx | int | — |
transform | Transform2D | — |
_AreaSetSpacevoid
public virtual void _AreaSetSpace(Rid area, Rid space);Overridable version of PhysicsServer2D.AreaSetSpace.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
space | Rid | — |
_AreaSetTransformvoid
public virtual void _AreaSetTransform(Rid area, Transform2D transform);Overridable version of PhysicsServer2D.AreaSetTransform.
| Name | Type | Default |
|---|---|---|
area | Rid | — |
transform | Transform2D | — |
_BodyAddCollisionExceptionvoid
public virtual void _BodyAddCollisionException(Rid body, Rid exceptedBody);Overridable version of PhysicsServer2D.BodyAddCollisionException.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
exceptedBody | Rid | — |
_BodyAddConstantCentralForcevoid
public virtual void _BodyAddConstantCentralForce(Rid body, Vector2 force);Overridable version of PhysicsServer2D.BodyAddConstantCentralForce.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
force | Vector2 | — |
_BodyAddConstantForcevoid
public virtual void _BodyAddConstantForce(Rid body, Vector2 force, Vector2 position);Overridable version of PhysicsServer2D.BodyAddConstantForce.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
force | Vector2 | — |
position | Vector2 | — |
_BodyAddConstantTorquevoid
public virtual void _BodyAddConstantTorque(Rid body, float torque);Overridable version of PhysicsServer2D.BodyAddConstantTorque.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
torque | float | — |
_BodyAddShapevoid
public virtual void _BodyAddShape(Rid body, Rid shape, Transform2D transform, bool disabled);Overridable version of PhysicsServer2D.BodyAddShape.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
shape | Rid | — |
transform | Transform2D | — |
disabled | bool | — |
_BodyApplyCentralForcevoid
public virtual void _BodyApplyCentralForce(Rid body, Vector2 force);Overridable version of PhysicsServer2D.BodyApplyCentralForce.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
force | Vector2 | — |
_BodyApplyCentralImpulsevoid
public virtual void _BodyApplyCentralImpulse(Rid body, Vector2 impulse);Overridable version of PhysicsServer2D.BodyApplyCentralImpulse.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
impulse | Vector2 | — |
_BodyApplyForcevoid
public virtual void _BodyApplyForce(Rid body, Vector2 force, Vector2 position);Overridable version of PhysicsServer2D.BodyApplyForce.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
force | Vector2 | — |
position | Vector2 | — |
_BodyApplyImpulsevoid
public virtual void _BodyApplyImpulse(Rid body, Vector2 impulse, Vector2 position);Overridable version of PhysicsServer2D.BodyApplyImpulse.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
impulse | Vector2 | — |
position | Vector2 | — |
_BodyApplyTorquevoid
public virtual void _BodyApplyTorque(Rid body, float torque);Overridable version of PhysicsServer2D.BodyApplyTorque.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
torque | float | — |
_BodyApplyTorqueImpulsevoid
public virtual void _BodyApplyTorqueImpulse(Rid body, float impulse);Overridable version of PhysicsServer2D.BodyApplyTorqueImpulse.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
impulse | float | — |
_BodyAttachCanvasInstanceIdvoid
public virtual void _BodyAttachCanvasInstanceId(Rid body, ulong id);Overridable version of PhysicsServer2D.BodyAttachCanvasInstanceId.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
id | ulong | — |
_BodyAttachObjectInstanceIdvoid
public virtual void _BodyAttachObjectInstanceId(Rid body, ulong id);Overridable version of PhysicsServer2D.BodyAttachObjectInstanceId.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
id | ulong | — |
_BodyClearShapesvoid
public virtual void _BodyClearShapes(Rid body);Overridable version of PhysicsServer2D.BodyClearShapes.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
_BodyCreateRid
public virtual Rid _BodyCreate();Overridable version of PhysicsServer2D.BodyCreate.
Rid_BodyGetCanvasInstanceIdulong
public virtual ulong _BodyGetCanvasInstanceId(Rid body);Overridable version of PhysicsServer2D.BodyGetCanvasInstanceId.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
ulong_BodyGetCollisionExceptionsReckfell.Collections.Array<Rid>
public virtual Reckfell.Collections.Array<Rid> _BodyGetCollisionExceptions(Rid body);Returns the Rids of all bodies added as collision exceptions for the given body. See also PhysicsServer2DExtension._BodyAddCollisionException and PhysicsServer2DExtension._BodyRemoveCollisionException.
Overridable version of PhysicsServer2D's internal body_get_collision_exceptions method. Corresponds to PhysicsBody2D.GetCollisionExceptions.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
Reckfell.Collections.Array<Rid>_BodyGetCollisionLayeruint
public virtual uint _BodyGetCollisionLayer(Rid body);Overridable version of PhysicsServer2D.BodyGetCollisionLayer.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
uint_BodyGetCollisionMaskuint
public virtual uint _BodyGetCollisionMask(Rid body);Overridable version of PhysicsServer2D.BodyGetCollisionMask.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
uint_BodyGetCollisionPriorityfloat
public virtual float _BodyGetCollisionPriority(Rid body);Overridable version of PhysicsServer2D.BodyGetCollisionPriority.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
float_BodyGetConstantForceVector2
public virtual Vector2 _BodyGetConstantForce(Rid body);Overridable version of PhysicsServer2D.BodyGetConstantForce.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
Vector2_BodyGetConstantTorquefloat
public virtual float _BodyGetConstantTorque(Rid body);Overridable version of PhysicsServer2D.BodyGetConstantTorque.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
float_BodyGetContactsReportedDepthThresholdfloat
public virtual float _BodyGetContactsReportedDepthThreshold(Rid body);Overridable version of PhysicsServer2D's internal body_get_contacts_reported_depth_threshold method.
Note: This method is currently unused by Reckfell's default physics implementation.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
float_BodyGetContinuousCollisionDetectionModePhysicsServer2D.CcdMode
public virtual PhysicsServer2D.CcdMode _BodyGetContinuousCollisionDetectionMode(Rid body);Overridable version of PhysicsServer2D.BodyGetContinuousCollisionDetectionMode.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
PhysicsServer2D.CcdMode_BodyGetDirectStatePhysicsDirectBodyState2D
public virtual PhysicsDirectBodyState2D _BodyGetDirectState(Rid body);Overridable version of PhysicsServer2D.BodyGetDirectState.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
PhysicsDirectBodyState2D_BodyGetMaxContactsReportedint
public virtual int _BodyGetMaxContactsReported(Rid body);Overridable version of PhysicsServer2D.BodyGetMaxContactsReported.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
int_BodyGetModePhysicsServer2D.BodyMode
public virtual PhysicsServer2D.BodyMode _BodyGetMode(Rid body);Overridable version of PhysicsServer2D.BodyGetMode.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
PhysicsServer2D.BodyMode_BodyGetObjectInstanceIdulong
public virtual ulong _BodyGetObjectInstanceId(Rid body);Overridable version of PhysicsServer2D.BodyGetObjectInstanceId.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
ulong_BodyGetParamVariant
public virtual Variant _BodyGetParam(Rid body, PhysicsServer2D.BodyParameter param);Overridable version of PhysicsServer2D.BodyGetParam.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
param | PhysicsServer2D.BodyParameter | — |
Variant_BodyGetShapeRid
public virtual Rid _BodyGetShape(Rid body, int shapeIdx);Overridable version of PhysicsServer2D.BodyGetShape.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
shapeIdx | int | — |
Rid_BodyGetShapeCountint
public virtual int _BodyGetShapeCount(Rid body);Overridable version of PhysicsServer2D.BodyGetShapeCount.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
int_BodyGetShapeTransformTransform2D
public virtual Transform2D _BodyGetShapeTransform(Rid body, int shapeIdx);Overridable version of PhysicsServer2D.BodyGetShapeTransform.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
shapeIdx | int | — |
Transform2D_BodyGetSpaceRid
public virtual Rid _BodyGetSpace(Rid body);Overridable version of PhysicsServer2D.BodyGetSpace.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
Rid_BodyGetStateVariant
public virtual Variant _BodyGetState(Rid body, PhysicsServer2D.BodyState state);Overridable version of PhysicsServer2D.BodyGetState.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
state | PhysicsServer2D.BodyState | — |
Variant_BodyIsOmittingForceIntegrationbool
public virtual bool _BodyIsOmittingForceIntegration(Rid body);Overridable version of PhysicsServer2D.BodyIsOmittingForceIntegration.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
bool_BodyRemoveCollisionExceptionvoid
public virtual void _BodyRemoveCollisionException(Rid body, Rid exceptedBody);Overridable version of PhysicsServer2D.BodyRemoveCollisionException.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
exceptedBody | Rid | — |
_BodyRemoveShapevoid
public virtual void _BodyRemoveShape(Rid body, int shapeIdx);Overridable version of PhysicsServer2D.BodyRemoveShape.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
shapeIdx | int | — |
_BodyResetMassPropertiesvoid
public virtual void _BodyResetMassProperties(Rid body);Overridable version of PhysicsServer2D.BodyResetMassProperties.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
_BodySetAxisVelocityvoid
public virtual void _BodySetAxisVelocity(Rid body, Vector2 axisVelocity);Overridable version of PhysicsServer2D.BodySetAxisVelocity.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
axisVelocity | Vector2 | — |
_BodySetCollisionLayervoid
public virtual void _BodySetCollisionLayer(Rid body, uint layer);Overridable version of PhysicsServer2D.BodySetCollisionLayer.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
layer | uint | — |
_BodySetCollisionMaskvoid
public virtual void _BodySetCollisionMask(Rid body, uint mask);Overridable version of PhysicsServer2D.BodySetCollisionMask.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
mask | uint | — |
_BodySetCollisionPriorityvoid
public virtual void _BodySetCollisionPriority(Rid body, float priority);Overridable version of PhysicsServer2D.BodySetCollisionPriority.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
priority | float | — |
_BodySetConstantForcevoid
public virtual void _BodySetConstantForce(Rid body, Vector2 force);Overridable version of PhysicsServer2D.BodySetConstantForce.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
force | Vector2 | — |
_BodySetConstantTorquevoid
public virtual void _BodySetConstantTorque(Rid body, float torque);Overridable version of PhysicsServer2D.BodySetConstantTorque.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
torque | float | — |
_BodySetContactsReportedDepthThresholdvoid
public virtual void _BodySetContactsReportedDepthThreshold(Rid body, float threshold);Overridable version of PhysicsServer2D's internal body_set_contacts_reported_depth_threshold method.
Note: This method is currently unused by Reckfell's default physics implementation.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
threshold | float | — |
_BodySetContinuousCollisionDetectionModevoid
public virtual void _BodySetContinuousCollisionDetectionMode(Rid body, PhysicsServer2D.CcdMode mode);Overridable version of PhysicsServer2D.BodySetContinuousCollisionDetectionMode.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
mode | PhysicsServer2D.CcdMode | — |
_BodySetForceIntegrationCallbackvoid
public virtual void _BodySetForceIntegrationCallback(Rid body, Callable callable, Variant userdata);Overridable version of PhysicsServer2D.BodySetForceIntegrationCallback.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
callable | Callable | — |
userdata | Variant | — |
_BodySetMaxContactsReportedvoid
public virtual void _BodySetMaxContactsReported(Rid body, int amount);Overridable version of PhysicsServer2D.BodySetMaxContactsReported.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
amount | int | — |
_BodySetModevoid
public virtual void _BodySetMode(Rid body, PhysicsServer2D.BodyMode mode);Overridable version of PhysicsServer2D.BodySetMode.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
mode | PhysicsServer2D.BodyMode | — |
_BodySetOmitForceIntegrationvoid
public virtual void _BodySetOmitForceIntegration(Rid body, bool enable);Overridable version of PhysicsServer2D.BodySetOmitForceIntegration.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
enable | bool | — |
_BodySetParamvoid
public virtual void _BodySetParam(Rid body, PhysicsServer2D.BodyParameter param, Variant value);Overridable version of PhysicsServer2D.BodySetParam.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
param | PhysicsServer2D.BodyParameter | — |
value | Variant | — |
_BodySetPickablevoid
public virtual void _BodySetPickable(Rid body, bool pickable);If set to true, allows the body with the given Rid to detect mouse inputs when the mouse cursor is hovering on it.
Overridable version of PhysicsServer2D's internal body_set_pickable method. Corresponds to CollisionObject2D.InputPickable.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
pickable | bool | — |
_BodySetShapevoid
public virtual void _BodySetShape(Rid body, int shapeIdx, Rid shape);Overridable version of PhysicsServer2D.BodySetShape.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
shapeIdx | int | — |
shape | Rid | — |
_BodySetShapeAsOneWayCollisionvoid
public virtual void _BodySetShapeAsOneWayCollision(Rid body, int shapeIdx, bool enable, float margin, Vector2 direction);Overridable version of PhysicsServer2D.BodySetShapeAsOneWayCollision.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
shapeIdx | int | — |
enable | bool | — |
margin | float | — |
direction | Vector2 | — |
_BodySetShapeDisabledvoid
public virtual void _BodySetShapeDisabled(Rid body, int shapeIdx, bool disabled);Overridable version of PhysicsServer2D.BodySetShapeDisabled.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
shapeIdx | int | — |
disabled | bool | — |
_BodySetShapeTransformvoid
public virtual void _BodySetShapeTransform(Rid body, int shapeIdx, Transform2D transform);Overridable version of PhysicsServer2D.BodySetShapeTransform.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
shapeIdx | int | — |
transform | Transform2D | — |
_BodySetSpacevoid
public virtual void _BodySetSpace(Rid body, Rid space);Overridable version of PhysicsServer2D.BodySetSpace.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
space | Rid | — |
_BodySetStatevoid
public virtual void _BodySetState(Rid body, PhysicsServer2D.BodyState state, Variant value);Overridable version of PhysicsServer2D.BodySetState.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
state | PhysicsServer2D.BodyState | — |
value | Variant | — |
_BodySetStateSyncCallbackvoid
public virtual void _BodySetStateSyncCallback(Rid body, Callable callable);Assigns the body to call the given callable during the synchronization phase of the loop, before PhysicsServer2DExtension._Step is called. See also PhysicsServer2DExtension._Sync.
Overridable version of PhysicsServer2D.BodySetStateSyncCallback.
| Name | Type | Default |
|---|---|---|
body | Rid | — |
callable | Callable | — |
_CapsuleShapeCreateRid
public virtual Rid _CapsuleShapeCreate();Overridable version of PhysicsServer2D.CapsuleShapeCreate.
Rid_CircleShapeCreateRid
public virtual Rid _CircleShapeCreate();Overridable version of PhysicsServer2D.CircleShapeCreate.
Rid_ConcavePolygonShapeCreateRid
public virtual Rid _ConcavePolygonShapeCreate();Overridable version of PhysicsServer2D.ConcavePolygonShapeCreate.
Rid_ConvexPolygonShapeCreateRid
public virtual Rid _ConvexPolygonShapeCreate();Overridable version of PhysicsServer2D.ConvexPolygonShapeCreate.
Rid_DampedSpringJointGetParamfloat
public virtual float _DampedSpringJointGetParam(Rid joint, PhysicsServer2D.DampedSpringParam param);Overridable version of PhysicsServer2D.DampedSpringJointGetParam.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
param | PhysicsServer2D.DampedSpringParam | — |
float_DampedSpringJointSetParamvoid
public virtual void _DampedSpringJointSetParam(Rid joint, PhysicsServer2D.DampedSpringParam param, float value);Overridable version of PhysicsServer2D.DampedSpringJointSetParam.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
param | PhysicsServer2D.DampedSpringParam | — |
value | float | — |
_EndSyncvoid
public virtual void _EndSync();Called to indicate that the physics server has stopped synchronizing. It is in the loop's iteration/physics phase, and can access physics objects even if running on a separate thread. See also PhysicsServer2DExtension._Sync.
Overridable version of PhysicsServer2D's internal end_sync method.
_Finishvoid
public virtual void _Finish();Called when the main loop finalizes to shut down the physics server. See also MainLoop._Finalize and PhysicsServer2DExtension._Init.
Overridable version of PhysicsServer2D's internal finish method.
_FlushQueriesvoid
public virtual void _FlushQueries();Called every physics step before PhysicsServer2DExtension._Step to process all remaining queries.
Overridable version of PhysicsServer2D's internal flush_queries method.
_FreeRidvoid
public virtual void _FreeRid(Rid rid);Overridable version of PhysicsServer2D.FreeRid.
| Name | Type | Default |
|---|---|---|
rid | Rid | — |
_GetProcessInfoint
public virtual int _GetProcessInfo(PhysicsServer2D.ProcessInfo processInfo);Overridable version of PhysicsServer2D.GetProcessInfo.
| Name | Type | Default |
|---|---|---|
processInfo | PhysicsServer2D.ProcessInfo | — |
int_Initvoid
public virtual void _Init();Called when the main loop is initialized and creates a new instance of this physics server. See also MainLoop._Initialize and PhysicsServer2DExtension._Finish.
Overridable version of PhysicsServer2D's internal init method.
_IsFlushingQueriesbool
public virtual bool _IsFlushingQueries();Overridable method that should return true when the physics server is processing queries. See also PhysicsServer2DExtension._FlushQueries.
Overridable version of PhysicsServer2D's internal is_flushing_queries method.
bool_JointClearvoid
public virtual void _JointClear(Rid joint);Overridable version of PhysicsServer2D.JointClear.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
_JointCreateRid
public virtual Rid _JointCreate();Overridable version of PhysicsServer2D.JointCreate.
Rid_JointDisableCollisionsBetweenBodiesvoid
public virtual void _JointDisableCollisionsBetweenBodies(Rid joint, bool disable);Overridable version of PhysicsServer2D.JointDisableCollisionsBetweenBodies.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
disable | bool | — |
_JointGetParamfloat
public virtual float _JointGetParam(Rid joint, PhysicsServer2D.JointParam param);Overridable version of PhysicsServer2D.JointGetParam.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
param | PhysicsServer2D.JointParam | — |
float_JointGetTypePhysicsServer2D.JointType
public virtual PhysicsServer2D.JointType _JointGetType(Rid joint);Overridable version of PhysicsServer2D.JointGetType.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
PhysicsServer2D.JointType_JointIsDisabledCollisionsBetweenBodiesbool
public virtual bool _JointIsDisabledCollisionsBetweenBodies(Rid joint);Overridable version of PhysicsServer2D.JointIsDisabledCollisionsBetweenBodies.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
bool_JointMakeDampedSpringvoid
public virtual void _JointMakeDampedSpring(Rid joint, Vector2 anchorA, Vector2 anchorB, Rid bodyA, Rid bodyB);Overridable version of PhysicsServer2D.JointMakeDampedSpring.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
anchorA | Vector2 | — |
anchorB | Vector2 | — |
bodyA | Rid | — |
bodyB | Rid | — |
_JointMakeGroovevoid
public virtual void _JointMakeGroove(Rid joint, Vector2 aGroove1, Vector2 aGroove2, Vector2 bAnchor, Rid bodyA, Rid bodyB);Overridable version of PhysicsServer2D.JointMakeGroove.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
aGroove1 | Vector2 | — |
aGroove2 | Vector2 | — |
bAnchor | Vector2 | — |
bodyA | Rid | — |
bodyB | Rid | — |
_JointMakePinvoid
public virtual void _JointMakePin(Rid joint, Vector2 anchor, Rid bodyA, Rid bodyB);Overridable version of PhysicsServer2D.JointMakePin.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
anchor | Vector2 | — |
bodyA | Rid | — |
bodyB | Rid | — |
_JointSetParamvoid
public virtual void _JointSetParam(Rid joint, PhysicsServer2D.JointParam param, float value);Overridable version of PhysicsServer2D.JointSetParam.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
param | PhysicsServer2D.JointParam | — |
value | float | — |
_PinJointGetFlagbool
public virtual bool _PinJointGetFlag(Rid joint, PhysicsServer2D.PinJointFlag flag);Overridable version of PhysicsServer2D.PinJointGetFlag.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
flag | PhysicsServer2D.PinJointFlag | — |
bool_PinJointGetParamfloat
public virtual float _PinJointGetParam(Rid joint, PhysicsServer2D.PinJointParam param);Overridable version of PhysicsServer2D.PinJointGetParam.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
param | PhysicsServer2D.PinJointParam | — |
float_PinJointSetFlagvoid
public virtual void _PinJointSetFlag(Rid joint, PhysicsServer2D.PinJointFlag flag, bool enabled);Overridable version of PhysicsServer2D.PinJointSetFlag.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
flag | PhysicsServer2D.PinJointFlag | — |
enabled | bool | — |
_PinJointSetParamvoid
public virtual void _PinJointSetParam(Rid joint, PhysicsServer2D.PinJointParam param, float value);Overridable version of PhysicsServer2D.PinJointSetParam.
| Name | Type | Default |
|---|---|---|
joint | Rid | — |
param | PhysicsServer2D.PinJointParam | — |
value | float | — |
_RectangleShapeCreateRid
public virtual Rid _RectangleShapeCreate();Overridable version of PhysicsServer2D.RectangleShapeCreate.
Rid_SegmentShapeCreateRid
public virtual Rid _SegmentShapeCreate();Overridable version of PhysicsServer2D.SegmentShapeCreate.
Rid_SeparationRayShapeCreateRid
public virtual Rid _SeparationRayShapeCreate();Overridable version of PhysicsServer2D.SeparationRayShapeCreate.
Rid_SetActivevoid
public virtual void _SetActive(bool active);Overridable version of PhysicsServer2D.SetActive.
| Name | Type | Default |
|---|---|---|
active | bool | — |
_ShapeGetCustomSolverBiasfloat
public virtual float _ShapeGetCustomSolverBias(Rid shape);Should return the custom solver bias of the given shape, which defines how much bodies are forced to separate on contact when this shape is involved.
Overridable version of PhysicsServer2D's internal shape_get_custom_solver_bias method. Corresponds to Shape2D.CustomSolverBias.
| Name | Type | Default |
|---|---|---|
shape | Rid | — |
float_ShapeGetDataVariant
public virtual Variant _ShapeGetData(Rid shape);Overridable version of PhysicsServer2D.ShapeGetData.
| Name | Type | Default |
|---|---|---|
shape | Rid | — |
Variant_ShapeGetTypePhysicsServer2D.ShapeType
public virtual PhysicsServer2D.ShapeType _ShapeGetType(Rid shape);Overridable version of PhysicsServer2D.ShapeGetType.
| Name | Type | Default |
|---|---|---|
shape | Rid | — |
PhysicsServer2D.ShapeType_ShapeSetCustomSolverBiasvoid
public virtual void _ShapeSetCustomSolverBias(Rid shape, float bias);Should set the custom solver bias for the given shape. It defines how much bodies are forced to separate on contact.
Overridable version of PhysicsServer2D's internal shape_get_custom_solver_bias method. Corresponds to Shape2D.CustomSolverBias.
| Name | Type | Default |
|---|---|---|
shape | Rid | — |
bias | float | — |
_ShapeSetDatavoid
public virtual void _ShapeSetData(Rid shape, Variant data);Overridable version of PhysicsServer2D.ShapeSetData.
| Name | Type | Default |
|---|---|---|
shape | Rid | — |
data | Variant | — |
_SpaceCreateRid
public virtual Rid _SpaceCreate();Overridable version of PhysicsServer2D.SpaceCreate.
Rid_SpaceGetContactCountint
public virtual int _SpaceGetContactCount(Rid space);Should return how many contacts have occurred during the last physics step in the given space. See also PhysicsServer2DExtension._SpaceGetContacts and PhysicsServer2DExtension._SpaceSetDebugContacts.
Overridable version of PhysicsServer2D's internal space_get_contact_count method.
| Name | Type | Default |
|---|---|---|
space | Rid | — |
int_SpaceGetContactsVector2[]
public virtual Vector2[] _SpaceGetContacts(Rid space);Should return the positions of all contacts that have occurred during the last physics step in the given space. See also PhysicsServer2DExtension._SpaceGetContactCount and PhysicsServer2DExtension._SpaceSetDebugContacts.
Overridable version of PhysicsServer2D's internal space_get_contacts method.
| Name | Type | Default |
|---|---|---|
space | Rid | — |
Vector2[]_SpaceGetDirectStatePhysicsDirectSpaceState2D
public virtual PhysicsDirectSpaceState2D _SpaceGetDirectState(Rid space);Overridable version of PhysicsServer2D.SpaceGetDirectState.
| Name | Type | Default |
|---|---|---|
space | Rid | — |
PhysicsDirectSpaceState2D_SpaceGetParamfloat
public virtual float _SpaceGetParam(Rid space, PhysicsServer2D.SpaceParameter param);Overridable version of PhysicsServer2D.SpaceGetParam.
| Name | Type | Default |
|---|---|---|
space | Rid | — |
param | PhysicsServer2D.SpaceParameter | — |
float_SpaceIsActivebool
public virtual bool _SpaceIsActive(Rid space);Overridable version of PhysicsServer2D.SpaceIsActive.
| Name | Type | Default |
|---|---|---|
space | Rid | — |
bool_SpaceSetActivevoid
public virtual void _SpaceSetActive(Rid space, bool active);Overridable version of PhysicsServer2D.SpaceSetActive.
| Name | Type | Default |
|---|---|---|
space | Rid | — |
active | bool | — |
_SpaceSetDebugContactsvoid
public virtual void _SpaceSetDebugContacts(Rid space, int maxContacts);Used internally to allow the given space to store contact points, up to max_contacts. This is automatically set for the main World2D's space when EntityTree.DebugCollisionsHint is true, or by checking "Visible Collision Shapes" in the editor. Only works in debug builds.
Overridable version of PhysicsServer2D's internal space_set_debug_contacts method.
| Name | Type | Default |
|---|---|---|
space | Rid | — |
maxContacts | int | — |
_SpaceSetParamvoid
public virtual void _SpaceSetParam(Rid space, PhysicsServer2D.SpaceParameter param, float value);Overridable version of PhysicsServer2D.SpaceSetParam.
| Name | Type | Default |
|---|---|---|
space | Rid | — |
param | PhysicsServer2D.SpaceParameter | — |
value | float | — |
_Stepvoid
public virtual void _Step(float step);Called every physics step to process the physics simulation. step is the time elapsed since the last physics step, in seconds. It is usually the same as the value returned by Entity.GetPhysicsProcessDeltaTime.
Overridable version of PhysicsServer2D's internal [code skip-lint]step` method.
| Name | Type | Default |
|---|---|---|
step | float | — |
_Syncvoid
public virtual void _Sync();Called to indicate that the physics server is synchronizing and cannot access physics states if running on a separate thread. See also PhysicsServer2DExtension._EndSync.
Overridable version of PhysicsServer2D's internal sync method.
_WorldBoundaryShapeCreateRid
public virtual Rid _WorldBoundaryShapeCreate();Overridable version of PhysicsServer2D.WorldBoundaryShapeCreate.
Rid