reckfellENGINE

PhysicsServer2DExtension

Provides virtual methods that can be overridden to create custom PhysicsServer2D implementations.

On this page
class PhysicsServer2DExtensionReckfellSharpInherits PhysicsServer2DInstance

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
# PhysicsServer2DExtension
C#
public PhysicsServer2DExtension();

Methods137

BodyTestMotionIsExcludingBodybool
# BodyTestMotionIsExcludingBody
C#
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.

Parameters
NameTypeDefault
bodyRid—
Returns bool
BodyTestMotionIsExcludingObjectbool
# BodyTestMotionIsExcludingObject
C#
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.

Parameters
NameTypeDefault
objectulong—
Returns bool
_AreaAddShapevoid
# _AreaAddShape
C#
public virtual void _AreaAddShape(Rid area, Rid shape, Transform2D transform, bool disabled);

Overridable version of PhysicsServer2D.AreaAddShape.

Parameters
NameTypeDefault
areaRid—
shapeRid—
transformTransform2D—
disabledbool—
_AreaAttachCanvasInstanceIdvoid
# _AreaAttachCanvasInstanceId
C#
public virtual void _AreaAttachCanvasInstanceId(Rid area, ulong id);

Overridable version of PhysicsServer2D.AreaAttachCanvasInstanceId.

Parameters
NameTypeDefault
areaRid—
idulong—
_AreaAttachObjectInstanceIdvoid
# _AreaAttachObjectInstanceId
C#
public virtual void _AreaAttachObjectInstanceId(Rid area, ulong id);

Overridable version of PhysicsServer2D.AreaAttachObjectInstanceId.

Parameters
NameTypeDefault
areaRid—
idulong—
_AreaClearShapesvoid
# _AreaClearShapes
C#
public virtual void _AreaClearShapes(Rid area);

Overridable version of PhysicsServer2D.AreaClearShapes.

Parameters
NameTypeDefault
areaRid—
_AreaCreateRid
# _AreaCreate
C#
public virtual Rid _AreaCreate();

Overridable version of PhysicsServer2D.AreaCreate.

Returns Rid
_AreaGetCanvasInstanceIdulong
# _AreaGetCanvasInstanceId
C#
public virtual ulong _AreaGetCanvasInstanceId(Rid area);

Overridable version of PhysicsServer2D.AreaGetCanvasInstanceId.

Parameters
NameTypeDefault
areaRid—
Returns ulong
_AreaGetCollisionLayeruint
# _AreaGetCollisionLayer
C#
public virtual uint _AreaGetCollisionLayer(Rid area);

Overridable version of PhysicsServer2D.AreaGetCollisionLayer.

Parameters
NameTypeDefault
areaRid—
Returns uint
_AreaGetCollisionMaskuint
# _AreaGetCollisionMask
C#
public virtual uint _AreaGetCollisionMask(Rid area);

Overridable version of PhysicsServer2D.AreaGetCollisionMask.

Parameters
NameTypeDefault
areaRid—
Returns uint
_AreaGetObjectInstanceIdulong
# _AreaGetObjectInstanceId
C#
public virtual ulong _AreaGetObjectInstanceId(Rid area);

Overridable version of PhysicsServer2D.AreaGetObjectInstanceId.

Parameters
NameTypeDefault
areaRid—
Returns ulong
_AreaGetParamVariant
# _AreaGetParam
C#
public virtual Variant _AreaGetParam(Rid area, PhysicsServer2D.AreaParameter param);

Overridable version of PhysicsServer2D.AreaGetParam.

Parameters
NameTypeDefault
areaRid—
paramPhysicsServer2D.AreaParameter—
Returns Variant
_AreaGetShapeRid
# _AreaGetShape
C#
public virtual Rid _AreaGetShape(Rid area, int shapeIdx);

Overridable version of PhysicsServer2D.AreaGetShape.

Parameters
NameTypeDefault
areaRid—
shapeIdxint—
Returns Rid
_AreaGetShapeCountint
# _AreaGetShapeCount
C#
public virtual int _AreaGetShapeCount(Rid area);

Overridable version of PhysicsServer2D.AreaGetShapeCount.

Parameters
NameTypeDefault
areaRid—
Returns int
_AreaGetShapeTransformTransform2D
# _AreaGetShapeTransform
C#
public virtual Transform2D _AreaGetShapeTransform(Rid area, int shapeIdx);

Overridable version of PhysicsServer2D.AreaGetShapeTransform.

Parameters
NameTypeDefault
areaRid—
shapeIdxint—
Returns Transform2D
_AreaGetSpaceRid
# _AreaGetSpace
C#
public virtual Rid _AreaGetSpace(Rid area);

Overridable version of PhysicsServer2D.AreaGetSpace.

Parameters
NameTypeDefault
areaRid—
Returns Rid
_AreaGetTransformTransform2D
# _AreaGetTransform
C#
public virtual Transform2D _AreaGetTransform(Rid area);

Overridable version of PhysicsServer2D.AreaGetTransform.

Parameters
NameTypeDefault
areaRid—
Returns Transform2D
_AreaRemoveShapevoid
# _AreaRemoveShape
C#
public virtual void _AreaRemoveShape(Rid area, int shapeIdx);

Overridable version of PhysicsServer2D.AreaRemoveShape.

Parameters
NameTypeDefault
areaRid—
shapeIdxint—
_AreaSetAreaMonitorCallbackvoid
# _AreaSetAreaMonitorCallback
C#
public virtual void _AreaSetAreaMonitorCallback(Rid area, Callable callback);

Overridable version of PhysicsServer2D.AreaSetAreaMonitorCallback.

Parameters
NameTypeDefault
areaRid—
callbackCallable—
_AreaSetCollisionLayervoid
# _AreaSetCollisionLayer
C#
public virtual void _AreaSetCollisionLayer(Rid area, uint layer);

Overridable version of PhysicsServer2D.AreaSetCollisionLayer.

Parameters
NameTypeDefault
areaRid—
layeruint—
_AreaSetCollisionMaskvoid
# _AreaSetCollisionMask
C#
public virtual void _AreaSetCollisionMask(Rid area, uint mask);

Overridable version of PhysicsServer2D.AreaSetCollisionMask.

Parameters
NameTypeDefault
areaRid—
maskuint—
_AreaSetMonitorCallbackvoid
# _AreaSetMonitorCallback
C#
public virtual void _AreaSetMonitorCallback(Rid area, Callable callback);

Overridable version of PhysicsServer2D.AreaSetMonitorCallback.

Parameters
NameTypeDefault
areaRid—
callbackCallable—
_AreaSetMonitorablevoid
# _AreaSetMonitorable
C#
public virtual void _AreaSetMonitorable(Rid area, bool monitorable);

Overridable version of PhysicsServer2D.AreaSetMonitorable.

Parameters
NameTypeDefault
areaRid—
monitorablebool—
_AreaSetParamvoid
# _AreaSetParam
C#
public virtual void _AreaSetParam(Rid area, PhysicsServer2D.AreaParameter param, Variant value);

Overridable version of PhysicsServer2D.AreaSetParam.

Parameters
NameTypeDefault
areaRid—
paramPhysicsServer2D.AreaParameter—
valueVariant—
_AreaSetPickablevoid
# _AreaSetPickable
C#
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.

Parameters
NameTypeDefault
areaRid—
pickablebool—
_AreaSetShapevoid
# _AreaSetShape
C#
public virtual void _AreaSetShape(Rid area, int shapeIdx, Rid shape);

Overridable version of PhysicsServer2D.AreaSetShape.

Parameters
NameTypeDefault
areaRid—
shapeIdxint—
shapeRid—
_AreaSetShapeDisabledvoid
# _AreaSetShapeDisabled
C#
public virtual void _AreaSetShapeDisabled(Rid area, int shapeIdx, bool disabled);

Overridable version of PhysicsServer2D.AreaSetShapeDisabled.

Parameters
NameTypeDefault
areaRid—
shapeIdxint—
disabledbool—
_AreaSetShapeTransformvoid
# _AreaSetShapeTransform
C#
public virtual void _AreaSetShapeTransform(Rid area, int shapeIdx, Transform2D transform);

Overridable version of PhysicsServer2D.AreaSetShapeTransform.

Parameters
NameTypeDefault
areaRid—
shapeIdxint—
transformTransform2D—
_AreaSetSpacevoid
# _AreaSetSpace
C#
public virtual void _AreaSetSpace(Rid area, Rid space);

Overridable version of PhysicsServer2D.AreaSetSpace.

Parameters
NameTypeDefault
areaRid—
spaceRid—
_AreaSetTransformvoid
# _AreaSetTransform
C#
public virtual void _AreaSetTransform(Rid area, Transform2D transform);

Overridable version of PhysicsServer2D.AreaSetTransform.

Parameters
NameTypeDefault
areaRid—
transformTransform2D—
_BodyAddCollisionExceptionvoid
# _BodyAddCollisionException
C#
public virtual void _BodyAddCollisionException(Rid body, Rid exceptedBody);

Overridable version of PhysicsServer2D.BodyAddCollisionException.

Parameters
NameTypeDefault
bodyRid—
exceptedBodyRid—
_BodyAddConstantCentralForcevoid
# _BodyAddConstantCentralForce
C#
public virtual void _BodyAddConstantCentralForce(Rid body, Vector2 force);

Overridable version of PhysicsServer2D.BodyAddConstantCentralForce.

Parameters
NameTypeDefault
bodyRid—
forceVector2—
_BodyAddConstantForcevoid
# _BodyAddConstantForce
C#
public virtual void _BodyAddConstantForce(Rid body, Vector2 force, Vector2 position);

Overridable version of PhysicsServer2D.BodyAddConstantForce.

Parameters
NameTypeDefault
bodyRid—
forceVector2—
positionVector2—
_BodyAddConstantTorquevoid
# _BodyAddConstantTorque
C#
public virtual void _BodyAddConstantTorque(Rid body, float torque);

Overridable version of PhysicsServer2D.BodyAddConstantTorque.

Parameters
NameTypeDefault
bodyRid—
torquefloat—
_BodyAddShapevoid
# _BodyAddShape
C#
public virtual void _BodyAddShape(Rid body, Rid shape, Transform2D transform, bool disabled);

Overridable version of PhysicsServer2D.BodyAddShape.

Parameters
NameTypeDefault
bodyRid—
shapeRid—
transformTransform2D—
disabledbool—
_BodyApplyCentralForcevoid
# _BodyApplyCentralForce
C#
public virtual void _BodyApplyCentralForce(Rid body, Vector2 force);

Overridable version of PhysicsServer2D.BodyApplyCentralForce.

Parameters
NameTypeDefault
bodyRid—
forceVector2—
_BodyApplyCentralImpulsevoid
# _BodyApplyCentralImpulse
C#
public virtual void _BodyApplyCentralImpulse(Rid body, Vector2 impulse);

Overridable version of PhysicsServer2D.BodyApplyCentralImpulse.

Parameters
NameTypeDefault
bodyRid—
impulseVector2—
_BodyApplyForcevoid
# _BodyApplyForce
C#
public virtual void _BodyApplyForce(Rid body, Vector2 force, Vector2 position);

Overridable version of PhysicsServer2D.BodyApplyForce.

Parameters
NameTypeDefault
bodyRid—
forceVector2—
positionVector2—
_BodyApplyImpulsevoid
# _BodyApplyImpulse
C#
public virtual void _BodyApplyImpulse(Rid body, Vector2 impulse, Vector2 position);

Overridable version of PhysicsServer2D.BodyApplyImpulse.

Parameters
NameTypeDefault
bodyRid—
impulseVector2—
positionVector2—
_BodyApplyTorquevoid
# _BodyApplyTorque
C#
public virtual void _BodyApplyTorque(Rid body, float torque);

Overridable version of PhysicsServer2D.BodyApplyTorque.

Parameters
NameTypeDefault
bodyRid—
torquefloat—
_BodyApplyTorqueImpulsevoid
# _BodyApplyTorqueImpulse
C#
public virtual void _BodyApplyTorqueImpulse(Rid body, float impulse);

Overridable version of PhysicsServer2D.BodyApplyTorqueImpulse.

Parameters
NameTypeDefault
bodyRid—
impulsefloat—
_BodyAttachCanvasInstanceIdvoid
# _BodyAttachCanvasInstanceId
C#
public virtual void _BodyAttachCanvasInstanceId(Rid body, ulong id);

Overridable version of PhysicsServer2D.BodyAttachCanvasInstanceId.

Parameters
NameTypeDefault
bodyRid—
idulong—
_BodyAttachObjectInstanceIdvoid
# _BodyAttachObjectInstanceId
C#
public virtual void _BodyAttachObjectInstanceId(Rid body, ulong id);

Overridable version of PhysicsServer2D.BodyAttachObjectInstanceId.

Parameters
NameTypeDefault
bodyRid—
idulong—
_BodyClearShapesvoid
# _BodyClearShapes
C#
public virtual void _BodyClearShapes(Rid body);

Overridable version of PhysicsServer2D.BodyClearShapes.

Parameters
NameTypeDefault
bodyRid—
_BodyCreateRid
# _BodyCreate
C#
public virtual Rid _BodyCreate();

Overridable version of PhysicsServer2D.BodyCreate.

Returns Rid
_BodyGetCanvasInstanceIdulong
# _BodyGetCanvasInstanceId
C#
public virtual ulong _BodyGetCanvasInstanceId(Rid body);

Overridable version of PhysicsServer2D.BodyGetCanvasInstanceId.

Parameters
NameTypeDefault
bodyRid—
Returns ulong
_BodyGetCollisionExceptionsReckfell.Collections.Array<Rid>
# _BodyGetCollisionExceptions
C#
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.

Parameters
NameTypeDefault
bodyRid—
Returns Reckfell.Collections.Array<Rid>
_BodyGetCollisionLayeruint
# _BodyGetCollisionLayer
C#
public virtual uint _BodyGetCollisionLayer(Rid body);

Overridable version of PhysicsServer2D.BodyGetCollisionLayer.

Parameters
NameTypeDefault
bodyRid—
Returns uint
_BodyGetCollisionMaskuint
# _BodyGetCollisionMask
C#
public virtual uint _BodyGetCollisionMask(Rid body);

Overridable version of PhysicsServer2D.BodyGetCollisionMask.

Parameters
NameTypeDefault
bodyRid—
Returns uint
_BodyGetCollisionPriorityfloat
# _BodyGetCollisionPriority
C#
public virtual float _BodyGetCollisionPriority(Rid body);

Overridable version of PhysicsServer2D.BodyGetCollisionPriority.

Parameters
NameTypeDefault
bodyRid—
Returns float
_BodyGetConstantForceVector2
# _BodyGetConstantForce
C#
public virtual Vector2 _BodyGetConstantForce(Rid body);

Overridable version of PhysicsServer2D.BodyGetConstantForce.

Parameters
NameTypeDefault
bodyRid—
Returns Vector2
_BodyGetConstantTorquefloat
# _BodyGetConstantTorque
C#
public virtual float _BodyGetConstantTorque(Rid body);

Overridable version of PhysicsServer2D.BodyGetConstantTorque.

Parameters
NameTypeDefault
bodyRid—
Returns float
_BodyGetContactsReportedDepthThresholdfloat
# _BodyGetContactsReportedDepthThreshold
C#
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.

Parameters
NameTypeDefault
bodyRid—
Returns float
_BodyGetContinuousCollisionDetectionModePhysicsServer2D.CcdMode
# _BodyGetContinuousCollisionDetectionMode
C#
public virtual PhysicsServer2D.CcdMode _BodyGetContinuousCollisionDetectionMode(Rid body);

Overridable version of PhysicsServer2D.BodyGetContinuousCollisionDetectionMode.

Parameters
NameTypeDefault
bodyRid—
Returns PhysicsServer2D.CcdMode
_BodyGetDirectStatePhysicsDirectBodyState2D
# _BodyGetDirectState
C#
public virtual PhysicsDirectBodyState2D _BodyGetDirectState(Rid body);

Overridable version of PhysicsServer2D.BodyGetDirectState.

Parameters
NameTypeDefault
bodyRid—
Returns PhysicsDirectBodyState2D
_BodyGetMaxContactsReportedint
# _BodyGetMaxContactsReported
C#
public virtual int _BodyGetMaxContactsReported(Rid body);

Overridable version of PhysicsServer2D.BodyGetMaxContactsReported.

Parameters
NameTypeDefault
bodyRid—
Returns int
_BodyGetModePhysicsServer2D.BodyMode
# _BodyGetMode
C#
public virtual PhysicsServer2D.BodyMode _BodyGetMode(Rid body);

Overridable version of PhysicsServer2D.BodyGetMode.

Parameters
NameTypeDefault
bodyRid—
Returns PhysicsServer2D.BodyMode
_BodyGetObjectInstanceIdulong
# _BodyGetObjectInstanceId
C#
public virtual ulong _BodyGetObjectInstanceId(Rid body);

Overridable version of PhysicsServer2D.BodyGetObjectInstanceId.

Parameters
NameTypeDefault
bodyRid—
Returns ulong
_BodyGetParamVariant
# _BodyGetParam
C#
public virtual Variant _BodyGetParam(Rid body, PhysicsServer2D.BodyParameter param);

Overridable version of PhysicsServer2D.BodyGetParam.

Parameters
NameTypeDefault
bodyRid—
paramPhysicsServer2D.BodyParameter—
Returns Variant
_BodyGetShapeRid
# _BodyGetShape
C#
public virtual Rid _BodyGetShape(Rid body, int shapeIdx);

Overridable version of PhysicsServer2D.BodyGetShape.

Parameters
NameTypeDefault
bodyRid—
shapeIdxint—
Returns Rid
_BodyGetShapeCountint
# _BodyGetShapeCount
C#
public virtual int _BodyGetShapeCount(Rid body);

Overridable version of PhysicsServer2D.BodyGetShapeCount.

Parameters
NameTypeDefault
bodyRid—
Returns int
_BodyGetShapeTransformTransform2D
# _BodyGetShapeTransform
C#
public virtual Transform2D _BodyGetShapeTransform(Rid body, int shapeIdx);

Overridable version of PhysicsServer2D.BodyGetShapeTransform.

Parameters
NameTypeDefault
bodyRid—
shapeIdxint—
Returns Transform2D
_BodyGetSpaceRid
# _BodyGetSpace
C#
public virtual Rid _BodyGetSpace(Rid body);

Overridable version of PhysicsServer2D.BodyGetSpace.

Parameters
NameTypeDefault
bodyRid—
Returns Rid
_BodyGetStateVariant
# _BodyGetState
C#
public virtual Variant _BodyGetState(Rid body, PhysicsServer2D.BodyState state);

Overridable version of PhysicsServer2D.BodyGetState.

Parameters
NameTypeDefault
bodyRid—
statePhysicsServer2D.BodyState—
Returns Variant
_BodyIsOmittingForceIntegrationbool
# _BodyIsOmittingForceIntegration
C#
public virtual bool _BodyIsOmittingForceIntegration(Rid body);

Overridable version of PhysicsServer2D.BodyIsOmittingForceIntegration.

Parameters
NameTypeDefault
bodyRid—
Returns bool
_BodyRemoveCollisionExceptionvoid
# _BodyRemoveCollisionException
C#
public virtual void _BodyRemoveCollisionException(Rid body, Rid exceptedBody);

Overridable version of PhysicsServer2D.BodyRemoveCollisionException.

Parameters
NameTypeDefault
bodyRid—
exceptedBodyRid—
_BodyRemoveShapevoid
# _BodyRemoveShape
C#
public virtual void _BodyRemoveShape(Rid body, int shapeIdx);

Overridable version of PhysicsServer2D.BodyRemoveShape.

Parameters
NameTypeDefault
bodyRid—
shapeIdxint—
_BodyResetMassPropertiesvoid
# _BodyResetMassProperties
C#
public virtual void _BodyResetMassProperties(Rid body);

Overridable version of PhysicsServer2D.BodyResetMassProperties.

Parameters
NameTypeDefault
bodyRid—
_BodySetAxisVelocityvoid
# _BodySetAxisVelocity
C#
public virtual void _BodySetAxisVelocity(Rid body, Vector2 axisVelocity);

Overridable version of PhysicsServer2D.BodySetAxisVelocity.

Parameters
NameTypeDefault
bodyRid—
axisVelocityVector2—
_BodySetCollisionLayervoid
# _BodySetCollisionLayer
C#
public virtual void _BodySetCollisionLayer(Rid body, uint layer);

Overridable version of PhysicsServer2D.BodySetCollisionLayer.

Parameters
NameTypeDefault
bodyRid—
layeruint—
_BodySetCollisionMaskvoid
# _BodySetCollisionMask
C#
public virtual void _BodySetCollisionMask(Rid body, uint mask);

Overridable version of PhysicsServer2D.BodySetCollisionMask.

Parameters
NameTypeDefault
bodyRid—
maskuint—
_BodySetCollisionPriorityvoid
# _BodySetCollisionPriority
C#
public virtual void _BodySetCollisionPriority(Rid body, float priority);

Overridable version of PhysicsServer2D.BodySetCollisionPriority.

Parameters
NameTypeDefault
bodyRid—
priorityfloat—
_BodySetConstantForcevoid
# _BodySetConstantForce
C#
public virtual void _BodySetConstantForce(Rid body, Vector2 force);

Overridable version of PhysicsServer2D.BodySetConstantForce.

Parameters
NameTypeDefault
bodyRid—
forceVector2—
_BodySetConstantTorquevoid
# _BodySetConstantTorque
C#
public virtual void _BodySetConstantTorque(Rid body, float torque);

Overridable version of PhysicsServer2D.BodySetConstantTorque.

Parameters
NameTypeDefault
bodyRid—
torquefloat—
_BodySetContactsReportedDepthThresholdvoid
# _BodySetContactsReportedDepthThreshold
C#
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.

Parameters
NameTypeDefault
bodyRid—
thresholdfloat—
_BodySetContinuousCollisionDetectionModevoid
# _BodySetContinuousCollisionDetectionMode
C#
public virtual void _BodySetContinuousCollisionDetectionMode(Rid body, PhysicsServer2D.CcdMode mode);

Overridable version of PhysicsServer2D.BodySetContinuousCollisionDetectionMode.

Parameters
NameTypeDefault
bodyRid—
modePhysicsServer2D.CcdMode—
_BodySetForceIntegrationCallbackvoid
# _BodySetForceIntegrationCallback
C#
public virtual void _BodySetForceIntegrationCallback(Rid body, Callable callable, Variant userdata);

Overridable version of PhysicsServer2D.BodySetForceIntegrationCallback.

Parameters
NameTypeDefault
bodyRid—
callableCallable—
userdataVariant—
_BodySetMaxContactsReportedvoid
# _BodySetMaxContactsReported
C#
public virtual void _BodySetMaxContactsReported(Rid body, int amount);

Overridable version of PhysicsServer2D.BodySetMaxContactsReported.

Parameters
NameTypeDefault
bodyRid—
amountint—
_BodySetModevoid
# _BodySetMode
C#
public virtual void _BodySetMode(Rid body, PhysicsServer2D.BodyMode mode);

Overridable version of PhysicsServer2D.BodySetMode.

Parameters
NameTypeDefault
bodyRid—
modePhysicsServer2D.BodyMode—
_BodySetOmitForceIntegrationvoid
# _BodySetOmitForceIntegration
C#
public virtual void _BodySetOmitForceIntegration(Rid body, bool enable);

Overridable version of PhysicsServer2D.BodySetOmitForceIntegration.

Parameters
NameTypeDefault
bodyRid—
enablebool—
_BodySetParamvoid
# _BodySetParam
C#
public virtual void _BodySetParam(Rid body, PhysicsServer2D.BodyParameter param, Variant value);

Overridable version of PhysicsServer2D.BodySetParam.

Parameters
NameTypeDefault
bodyRid—
paramPhysicsServer2D.BodyParameter—
valueVariant—
_BodySetPickablevoid
# _BodySetPickable
C#
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.

Parameters
NameTypeDefault
bodyRid—
pickablebool—
_BodySetShapevoid
# _BodySetShape
C#
public virtual void _BodySetShape(Rid body, int shapeIdx, Rid shape);

Overridable version of PhysicsServer2D.BodySetShape.

Parameters
NameTypeDefault
bodyRid—
shapeIdxint—
shapeRid—
_BodySetShapeAsOneWayCollisionvoid
# _BodySetShapeAsOneWayCollision
C#
public virtual void _BodySetShapeAsOneWayCollision(Rid body, int shapeIdx, bool enable, float margin, Vector2 direction);

Overridable version of PhysicsServer2D.BodySetShapeAsOneWayCollision.

Parameters
NameTypeDefault
bodyRid—
shapeIdxint—
enablebool—
marginfloat—
directionVector2—
_BodySetShapeDisabledvoid
# _BodySetShapeDisabled
C#
public virtual void _BodySetShapeDisabled(Rid body, int shapeIdx, bool disabled);

Overridable version of PhysicsServer2D.BodySetShapeDisabled.

Parameters
NameTypeDefault
bodyRid—
shapeIdxint—
disabledbool—
_BodySetShapeTransformvoid
# _BodySetShapeTransform
C#
public virtual void _BodySetShapeTransform(Rid body, int shapeIdx, Transform2D transform);

Overridable version of PhysicsServer2D.BodySetShapeTransform.

Parameters
NameTypeDefault
bodyRid—
shapeIdxint—
transformTransform2D—
_BodySetSpacevoid
# _BodySetSpace
C#
public virtual void _BodySetSpace(Rid body, Rid space);

Overridable version of PhysicsServer2D.BodySetSpace.

Parameters
NameTypeDefault
bodyRid—
spaceRid—
_BodySetStatevoid
# _BodySetState
C#
public virtual void _BodySetState(Rid body, PhysicsServer2D.BodyState state, Variant value);

Overridable version of PhysicsServer2D.BodySetState.

Parameters
NameTypeDefault
bodyRid—
statePhysicsServer2D.BodyState—
valueVariant—
_BodySetStateSyncCallbackvoid
# _BodySetStateSyncCallback
C#
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.

Parameters
NameTypeDefault
bodyRid—
callableCallable—
_CapsuleShapeCreateRid
# _CapsuleShapeCreate
C#
public virtual Rid _CapsuleShapeCreate();

Overridable version of PhysicsServer2D.CapsuleShapeCreate.

Returns Rid
_CircleShapeCreateRid
# _CircleShapeCreate
C#
public virtual Rid _CircleShapeCreate();

Overridable version of PhysicsServer2D.CircleShapeCreate.

Returns Rid
_ConcavePolygonShapeCreateRid
# _ConcavePolygonShapeCreate
C#
public virtual Rid _ConcavePolygonShapeCreate();

Overridable version of PhysicsServer2D.ConcavePolygonShapeCreate.

Returns Rid
_ConvexPolygonShapeCreateRid
# _ConvexPolygonShapeCreate
C#
public virtual Rid _ConvexPolygonShapeCreate();

Overridable version of PhysicsServer2D.ConvexPolygonShapeCreate.

Returns Rid
_DampedSpringJointGetParamfloat
# _DampedSpringJointGetParam
C#
public virtual float _DampedSpringJointGetParam(Rid joint, PhysicsServer2D.DampedSpringParam param);

Overridable version of PhysicsServer2D.DampedSpringJointGetParam.

Parameters
NameTypeDefault
jointRid—
paramPhysicsServer2D.DampedSpringParam—
Returns float
_DampedSpringJointSetParamvoid
# _DampedSpringJointSetParam
C#
public virtual void _DampedSpringJointSetParam(Rid joint, PhysicsServer2D.DampedSpringParam param, float value);

Overridable version of PhysicsServer2D.DampedSpringJointSetParam.

Parameters
NameTypeDefault
jointRid—
paramPhysicsServer2D.DampedSpringParam—
valuefloat—
_EndSyncvoid
# _EndSync
C#
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
# _Finish
C#
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
# _FlushQueries
C#
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
# _FreeRid
C#
public virtual void _FreeRid(Rid rid);

Overridable version of PhysicsServer2D.FreeRid.

Parameters
NameTypeDefault
ridRid—
_GetProcessInfoint
# _GetProcessInfo
C#
public virtual int _GetProcessInfo(PhysicsServer2D.ProcessInfo processInfo);

Overridable version of PhysicsServer2D.GetProcessInfo.

Parameters
NameTypeDefault
processInfoPhysicsServer2D.ProcessInfo—
Returns int
_Initvoid
# _Init
C#
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
# _IsFlushingQueries
C#
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.

Returns bool
_JointClearvoid
# _JointClear
C#
public virtual void _JointClear(Rid joint);

Overridable version of PhysicsServer2D.JointClear.

Parameters
NameTypeDefault
jointRid—
_JointCreateRid
# _JointCreate
C#
public virtual Rid _JointCreate();

Overridable version of PhysicsServer2D.JointCreate.

Returns Rid
_JointDisableCollisionsBetweenBodiesvoid
# _JointDisableCollisionsBetweenBodies
C#
public virtual void _JointDisableCollisionsBetweenBodies(Rid joint, bool disable);

Overridable version of PhysicsServer2D.JointDisableCollisionsBetweenBodies.

Parameters
NameTypeDefault
jointRid—
disablebool—
_JointGetParamfloat
# _JointGetParam
C#
public virtual float _JointGetParam(Rid joint, PhysicsServer2D.JointParam param);

Overridable version of PhysicsServer2D.JointGetParam.

Parameters
NameTypeDefault
jointRid—
paramPhysicsServer2D.JointParam—
Returns float
_JointGetTypePhysicsServer2D.JointType
# _JointGetType
C#
public virtual PhysicsServer2D.JointType _JointGetType(Rid joint);

Overridable version of PhysicsServer2D.JointGetType.

Parameters
NameTypeDefault
jointRid—
Returns PhysicsServer2D.JointType
_JointIsDisabledCollisionsBetweenBodiesbool
# _JointIsDisabledCollisionsBetweenBodies
C#
public virtual bool _JointIsDisabledCollisionsBetweenBodies(Rid joint);

Overridable version of PhysicsServer2D.JointIsDisabledCollisionsBetweenBodies.

Parameters
NameTypeDefault
jointRid—
Returns bool
_JointMakeDampedSpringvoid
# _JointMakeDampedSpring
C#
public virtual void _JointMakeDampedSpring(Rid joint, Vector2 anchorA, Vector2 anchorB, Rid bodyA, Rid bodyB);

Overridable version of PhysicsServer2D.JointMakeDampedSpring.

Parameters
NameTypeDefault
jointRid—
anchorAVector2—
anchorBVector2—
bodyARid—
bodyBRid—
_JointMakeGroovevoid
# _JointMakeGroove
C#
public virtual void _JointMakeGroove(Rid joint, Vector2 aGroove1, Vector2 aGroove2, Vector2 bAnchor, Rid bodyA, Rid bodyB);

Overridable version of PhysicsServer2D.JointMakeGroove.

Parameters
NameTypeDefault
jointRid—
aGroove1Vector2—
aGroove2Vector2—
bAnchorVector2—
bodyARid—
bodyBRid—
_JointMakePinvoid
# _JointMakePin
C#
public virtual void _JointMakePin(Rid joint, Vector2 anchor, Rid bodyA, Rid bodyB);

Overridable version of PhysicsServer2D.JointMakePin.

Parameters
NameTypeDefault
jointRid—
anchorVector2—
bodyARid—
bodyBRid—
_JointSetParamvoid
# _JointSetParam
C#
public virtual void _JointSetParam(Rid joint, PhysicsServer2D.JointParam param, float value);

Overridable version of PhysicsServer2D.JointSetParam.

Parameters
NameTypeDefault
jointRid—
paramPhysicsServer2D.JointParam—
valuefloat—
_PinJointGetFlagbool
# _PinJointGetFlag
C#
public virtual bool _PinJointGetFlag(Rid joint, PhysicsServer2D.PinJointFlag flag);

Overridable version of PhysicsServer2D.PinJointGetFlag.

Parameters
NameTypeDefault
jointRid—
flagPhysicsServer2D.PinJointFlag—
Returns bool
_PinJointGetParamfloat
# _PinJointGetParam
C#
public virtual float _PinJointGetParam(Rid joint, PhysicsServer2D.PinJointParam param);

Overridable version of PhysicsServer2D.PinJointGetParam.

Parameters
NameTypeDefault
jointRid—
paramPhysicsServer2D.PinJointParam—
Returns float
_PinJointSetFlagvoid
# _PinJointSetFlag
C#
public virtual void _PinJointSetFlag(Rid joint, PhysicsServer2D.PinJointFlag flag, bool enabled);

Overridable version of PhysicsServer2D.PinJointSetFlag.

Parameters
NameTypeDefault
jointRid—
flagPhysicsServer2D.PinJointFlag—
enabledbool—
_PinJointSetParamvoid
# _PinJointSetParam
C#
public virtual void _PinJointSetParam(Rid joint, PhysicsServer2D.PinJointParam param, float value);

Overridable version of PhysicsServer2D.PinJointSetParam.

Parameters
NameTypeDefault
jointRid—
paramPhysicsServer2D.PinJointParam—
valuefloat—
_RectangleShapeCreateRid
# _RectangleShapeCreate
C#
public virtual Rid _RectangleShapeCreate();

Overridable version of PhysicsServer2D.RectangleShapeCreate.

Returns Rid
_SegmentShapeCreateRid
# _SegmentShapeCreate
C#
public virtual Rid _SegmentShapeCreate();

Overridable version of PhysicsServer2D.SegmentShapeCreate.

Returns Rid
_SeparationRayShapeCreateRid
# _SeparationRayShapeCreate
C#
public virtual Rid _SeparationRayShapeCreate();

Overridable version of PhysicsServer2D.SeparationRayShapeCreate.

Returns Rid
_SetActivevoid
# _SetActive
C#
public virtual void _SetActive(bool active);

Overridable version of PhysicsServer2D.SetActive.

Parameters
NameTypeDefault
activebool—
_ShapeGetCustomSolverBiasfloat
# _ShapeGetCustomSolverBias
C#
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.

Parameters
NameTypeDefault
shapeRid—
Returns float
_ShapeGetDataVariant
# _ShapeGetData
C#
public virtual Variant _ShapeGetData(Rid shape);

Overridable version of PhysicsServer2D.ShapeGetData.

Parameters
NameTypeDefault
shapeRid—
Returns Variant
_ShapeGetTypePhysicsServer2D.ShapeType
# _ShapeGetType
C#
public virtual PhysicsServer2D.ShapeType _ShapeGetType(Rid shape);

Overridable version of PhysicsServer2D.ShapeGetType.

Parameters
NameTypeDefault
shapeRid—
Returns PhysicsServer2D.ShapeType
_ShapeSetCustomSolverBiasvoid
# _ShapeSetCustomSolverBias
C#
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.

Parameters
NameTypeDefault
shapeRid—
biasfloat—
_ShapeSetDatavoid
# _ShapeSetData
C#
public virtual void _ShapeSetData(Rid shape, Variant data);

Overridable version of PhysicsServer2D.ShapeSetData.

Parameters
NameTypeDefault
shapeRid—
dataVariant—
_SpaceCreateRid
# _SpaceCreate
C#
public virtual Rid _SpaceCreate();

Overridable version of PhysicsServer2D.SpaceCreate.

Returns Rid
_SpaceGetContactCountint
# _SpaceGetContactCount
C#
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.

Parameters
NameTypeDefault
spaceRid—
Returns int
_SpaceGetContactsVector2[]
# _SpaceGetContacts
C#
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.

Parameters
NameTypeDefault
spaceRid—
Returns Vector2[]
_SpaceGetDirectStatePhysicsDirectSpaceState2D
# _SpaceGetDirectState
C#
public virtual PhysicsDirectSpaceState2D _SpaceGetDirectState(Rid space);

Overridable version of PhysicsServer2D.SpaceGetDirectState.

Parameters
NameTypeDefault
spaceRid—
Returns PhysicsDirectSpaceState2D
_SpaceGetParamfloat
# _SpaceGetParam
C#
public virtual float _SpaceGetParam(Rid space, PhysicsServer2D.SpaceParameter param);

Overridable version of PhysicsServer2D.SpaceGetParam.

Parameters
NameTypeDefault
spaceRid—
paramPhysicsServer2D.SpaceParameter—
Returns float
_SpaceIsActivebool
# _SpaceIsActive
C#
public virtual bool _SpaceIsActive(Rid space);

Overridable version of PhysicsServer2D.SpaceIsActive.

Parameters
NameTypeDefault
spaceRid—
Returns bool
_SpaceSetActivevoid
# _SpaceSetActive
C#
public virtual void _SpaceSetActive(Rid space, bool active);

Overridable version of PhysicsServer2D.SpaceSetActive.

Parameters
NameTypeDefault
spaceRid—
activebool—
_SpaceSetDebugContactsvoid
# _SpaceSetDebugContacts
C#
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.

Parameters
NameTypeDefault
spaceRid—
maxContactsint—
_SpaceSetParamvoid
# _SpaceSetParam
C#
public virtual void _SpaceSetParam(Rid space, PhysicsServer2D.SpaceParameter param, float value);

Overridable version of PhysicsServer2D.SpaceSetParam.

Parameters
NameTypeDefault
spaceRid—
paramPhysicsServer2D.SpaceParameter—
valuefloat—
_Stepvoid
# _Step
C#
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.

Parameters
NameTypeDefault
stepfloat—
_Syncvoid
# _Sync
C#
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
# _WorldBoundaryShapeCreate
C#
public virtual Rid _WorldBoundaryShapeCreate();

Overridable version of PhysicsServer2D.WorldBoundaryShapeCreate.

Returns Rid
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.