Class PhysicsServer2DExtension
- Namespace
- Godot
- Assembly
- GodotSharp.dll
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.
public class PhysicsServer2DExtension : PhysicsServer2DInstance, IDisposable
- Inheritance
-
PhysicsServer2DExtension
- Implements
- Inherited Members
Constructors
PhysicsServer2DExtension()
public PhysicsServer2DExtension()
Methods
BodyTestMotionIsExcludingBody(Rid)
Returns true
if the body with the given Rid is being excluded from _body_test_motion
. See also GetInstanceId().
public bool BodyTestMotionIsExcludingBody(Rid body)
Parameters
body
Rid
Returns
BodyTestMotionIsExcludingObject(ulong)
Returns true
if the object with the given instance ID is being excluded from _body_test_motion
. See also GetInstanceId().
public bool BodyTestMotionIsExcludingObject(ulong @object)
Parameters
object
ulong
Returns
HasGodotClassMethod(in godot_string_name)
Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.
protected override bool HasGodotClassMethod(in godot_string_name method)
Parameters
method
godot_string_nameName of the method to check for.
Returns
HasGodotClassSignal(in godot_string_name)
Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.
protected override bool HasGodotClassSignal(in godot_string_name signal)
Parameters
signal
godot_string_nameName of the signal to check for.
Returns
InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)
Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
Parameters
method
godot_string_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.
Returns
_AreaAddShape(Rid, Rid, Transform2D, bool)
Overridable version of AreaAddShape(Rid, Rid, Transform2D?, bool).
public virtual void _AreaAddShape(Rid area, Rid shape, Transform2D transform, bool disabled)
Parameters
area
Ridshape
Ridtransform
Transform2Ddisabled
bool
_AreaAttachCanvasInstanceId(Rid, ulong)
Overridable version of AreaAttachCanvasInstanceId(Rid, ulong).
public virtual void _AreaAttachCanvasInstanceId(Rid area, ulong id)
Parameters
_AreaAttachObjectInstanceId(Rid, ulong)
Overridable version of AreaAttachObjectInstanceId(Rid, ulong).
public virtual void _AreaAttachObjectInstanceId(Rid area, ulong id)
Parameters
_AreaClearShapes(Rid)
Overridable version of AreaClearShapes(Rid).
public virtual void _AreaClearShapes(Rid area)
Parameters
area
Rid
_AreaCreate()
Overridable version of AreaCreate().
public virtual Rid _AreaCreate()
Returns
_AreaGetCanvasInstanceId(Rid)
Overridable version of AreaGetCanvasInstanceId(Rid).
public virtual ulong _AreaGetCanvasInstanceId(Rid area)
Parameters
area
Rid
Returns
_AreaGetCollisionLayer(Rid)
Overridable version of AreaGetCollisionLayer(Rid).
public virtual uint _AreaGetCollisionLayer(Rid area)
Parameters
area
Rid
Returns
_AreaGetCollisionMask(Rid)
Overridable version of AreaGetCollisionMask(Rid).
public virtual uint _AreaGetCollisionMask(Rid area)
Parameters
area
Rid
Returns
_AreaGetObjectInstanceId(Rid)
Overridable version of AreaGetObjectInstanceId(Rid).
public virtual ulong _AreaGetObjectInstanceId(Rid area)
Parameters
area
Rid
Returns
_AreaGetParam(Rid, AreaParameter)
Overridable version of AreaGetParam(Rid, AreaParameter).
public virtual Variant _AreaGetParam(Rid area, PhysicsServer2D.AreaParameter param)
Parameters
area
Ridparam
PhysicsServer2D.AreaParameter
Returns
_AreaGetShape(Rid, int)
Overridable version of AreaGetShape(Rid, int).
public virtual Rid _AreaGetShape(Rid area, int shapeIdx)
Parameters
Returns
_AreaGetShapeCount(Rid)
Overridable version of AreaGetShapeCount(Rid).
public virtual int _AreaGetShapeCount(Rid area)
Parameters
area
Rid
Returns
_AreaGetShapeTransform(Rid, int)
Overridable version of AreaGetShapeTransform(Rid, int).
public virtual Transform2D _AreaGetShapeTransform(Rid area, int shapeIdx)
Parameters
Returns
_AreaGetSpace(Rid)
Overridable version of AreaGetSpace(Rid).
public virtual Rid _AreaGetSpace(Rid area)
Parameters
area
Rid
Returns
_AreaGetTransform(Rid)
Overridable version of AreaGetTransform(Rid).
public virtual Transform2D _AreaGetTransform(Rid area)
Parameters
area
Rid
Returns
_AreaRemoveShape(Rid, int)
Overridable version of AreaRemoveShape(Rid, int).
public virtual void _AreaRemoveShape(Rid area, int shapeIdx)
Parameters
_AreaSetAreaMonitorCallback(Rid, Callable)
Overridable version of AreaSetAreaMonitorCallback(Rid, Callable).
public virtual void _AreaSetAreaMonitorCallback(Rid area, Callable callback)
Parameters
_AreaSetCollisionLayer(Rid, uint)
Overridable version of AreaSetCollisionLayer(Rid, uint).
public virtual void _AreaSetCollisionLayer(Rid area, uint layer)
Parameters
_AreaSetCollisionMask(Rid, uint)
Overridable version of AreaSetCollisionMask(Rid, uint).
public virtual void _AreaSetCollisionMask(Rid area, uint mask)
Parameters
_AreaSetMonitorCallback(Rid, Callable)
Overridable version of AreaSetMonitorCallback(Rid, Callable).
public virtual void _AreaSetMonitorCallback(Rid area, Callable callback)
Parameters
_AreaSetMonitorable(Rid, bool)
Overridable version of AreaSetMonitorable(Rid, bool).
public virtual void _AreaSetMonitorable(Rid area, bool monitorable)
Parameters
_AreaSetParam(Rid, AreaParameter, Variant)
Overridable version of AreaSetParam(Rid, AreaParameter, Variant).
public virtual void _AreaSetParam(Rid area, PhysicsServer2D.AreaParameter param, Variant value)
Parameters
area
Ridparam
PhysicsServer2D.AreaParametervalue
Variant
_AreaSetPickable(Rid, bool)
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 InputPickable.
public virtual void _AreaSetPickable(Rid area, bool pickable)
Parameters
_AreaSetShape(Rid, int, Rid)
Overridable version of AreaSetShape(Rid, int, Rid).
public virtual void _AreaSetShape(Rid area, int shapeIdx, Rid shape)
Parameters
_AreaSetShapeDisabled(Rid, int, bool)
Overridable version of AreaSetShapeDisabled(Rid, int, bool).
public virtual void _AreaSetShapeDisabled(Rid area, int shapeIdx, bool disabled)
Parameters
_AreaSetShapeTransform(Rid, int, Transform2D)
Overridable version of AreaSetShapeTransform(Rid, int, Transform2D).
public virtual void _AreaSetShapeTransform(Rid area, int shapeIdx, Transform2D transform)
Parameters
area
RidshapeIdx
inttransform
Transform2D
_AreaSetSpace(Rid, Rid)
Overridable version of AreaSetSpace(Rid, Rid).
public virtual void _AreaSetSpace(Rid area, Rid space)
Parameters
_AreaSetTransform(Rid, Transform2D)
Overridable version of AreaSetTransform(Rid, Transform2D).
public virtual void _AreaSetTransform(Rid area, Transform2D transform)
Parameters
area
Ridtransform
Transform2D
_BodyAddCollisionException(Rid, Rid)
Overridable version of BodyAddCollisionException(Rid, Rid).
public virtual void _BodyAddCollisionException(Rid body, Rid exceptedBody)
Parameters
_BodyAddConstantCentralForce(Rid, Vector2)
Overridable version of BodyAddConstantCentralForce(Rid, Vector2).
public virtual void _BodyAddConstantCentralForce(Rid body, Vector2 force)
Parameters
_BodyAddConstantForce(Rid, Vector2, Vector2)
Overridable version of BodyAddConstantForce(Rid, Vector2, Vector2?).
public virtual void _BodyAddConstantForce(Rid body, Vector2 force, Vector2 position)
Parameters
_BodyAddConstantTorque(Rid, float)
Overridable version of BodyAddConstantTorque(Rid, float).
public virtual void _BodyAddConstantTorque(Rid body, float torque)
Parameters
_BodyAddShape(Rid, Rid, Transform2D, bool)
Overridable version of BodyAddShape(Rid, Rid, Transform2D?, bool).
public virtual void _BodyAddShape(Rid body, Rid shape, Transform2D transform, bool disabled)
Parameters
body
Ridshape
Ridtransform
Transform2Ddisabled
bool
_BodyApplyCentralForce(Rid, Vector2)
Overridable version of BodyApplyCentralForce(Rid, Vector2).
public virtual void _BodyApplyCentralForce(Rid body, Vector2 force)
Parameters
_BodyApplyCentralImpulse(Rid, Vector2)
Overridable version of BodyApplyCentralImpulse(Rid, Vector2).
public virtual void _BodyApplyCentralImpulse(Rid body, Vector2 impulse)
Parameters
_BodyApplyForce(Rid, Vector2, Vector2)
Overridable version of BodyApplyForce(Rid, Vector2, Vector2?).
public virtual void _BodyApplyForce(Rid body, Vector2 force, Vector2 position)
Parameters
_BodyApplyImpulse(Rid, Vector2, Vector2)
Overridable version of BodyApplyImpulse(Rid, Vector2, Vector2?).
public virtual void _BodyApplyImpulse(Rid body, Vector2 impulse, Vector2 position)
Parameters
_BodyApplyTorque(Rid, float)
Overridable version of BodyApplyTorque(Rid, float).
public virtual void _BodyApplyTorque(Rid body, float torque)
Parameters
_BodyApplyTorqueImpulse(Rid, float)
Overridable version of BodyApplyTorqueImpulse(Rid, float).
public virtual void _BodyApplyTorqueImpulse(Rid body, float impulse)
Parameters
_BodyAttachCanvasInstanceId(Rid, ulong)
Overridable version of BodyAttachCanvasInstanceId(Rid, ulong).
public virtual void _BodyAttachCanvasInstanceId(Rid body, ulong id)
Parameters
_BodyAttachObjectInstanceId(Rid, ulong)
Overridable version of BodyAttachObjectInstanceId(Rid, ulong).
public virtual void _BodyAttachObjectInstanceId(Rid body, ulong id)
Parameters
_BodyClearShapes(Rid)
Overridable version of BodyClearShapes(Rid).
public virtual void _BodyClearShapes(Rid body)
Parameters
body
Rid
_BodyCreate()
Overridable version of BodyCreate().
public virtual Rid _BodyCreate()
Returns
_BodyGetCanvasInstanceId(Rid)
Overridable version of BodyGetCanvasInstanceId(Rid).
public virtual ulong _BodyGetCanvasInstanceId(Rid body)
Parameters
body
Rid
Returns
_BodyGetCollisionExceptions(Rid)
Returns the Rids of all bodies added as collision exceptions for the given body
. See also _BodyAddCollisionException(Rid, Rid) and _BodyRemoveCollisionException(Rid, Rid).
Overridable version of PhysicsServer2D's internal body_get_collision_exceptions
method. Corresponds to GetCollisionExceptions().
public virtual Array<Rid> _BodyGetCollisionExceptions(Rid body)
Parameters
body
Rid
Returns
_BodyGetCollisionLayer(Rid)
Overridable version of BodyGetCollisionLayer(Rid).
public virtual uint _BodyGetCollisionLayer(Rid body)
Parameters
body
Rid
Returns
_BodyGetCollisionMask(Rid)
Overridable version of BodyGetCollisionMask(Rid).
public virtual uint _BodyGetCollisionMask(Rid body)
Parameters
body
Rid
Returns
_BodyGetCollisionPriority(Rid)
Overridable version of BodyGetCollisionPriority(Rid).
public virtual float _BodyGetCollisionPriority(Rid body)
Parameters
body
Rid
Returns
_BodyGetConstantForce(Rid)
Overridable version of BodyGetConstantForce(Rid).
public virtual Vector2 _BodyGetConstantForce(Rid body)
Parameters
body
Rid
Returns
_BodyGetConstantTorque(Rid)
Overridable version of BodyGetConstantTorque(Rid).
public virtual float _BodyGetConstantTorque(Rid body)
Parameters
body
Rid
Returns
_BodyGetContactsReportedDepthThreshold(Rid)
Overridable version of PhysicsServer2D's internal body_get_contacts_reported_depth_threshold
method.
Note: This method is currently unused by Godot's default physics implementation.
public virtual float _BodyGetContactsReportedDepthThreshold(Rid body)
Parameters
body
Rid
Returns
_BodyGetContinuousCollisionDetectionMode(Rid)
Overridable version of BodyGetContinuousCollisionDetectionMode(Rid).
public virtual PhysicsServer2D.CcdMode _BodyGetContinuousCollisionDetectionMode(Rid body)
Parameters
body
Rid
Returns
_BodyGetDirectState(Rid)
Overridable version of BodyGetDirectState(Rid).
public virtual PhysicsDirectBodyState2D _BodyGetDirectState(Rid body)
Parameters
body
Rid
Returns
_BodyGetMaxContactsReported(Rid)
Overridable version of BodyGetMaxContactsReported(Rid).
public virtual int _BodyGetMaxContactsReported(Rid body)
Parameters
body
Rid
Returns
_BodyGetMode(Rid)
Overridable version of BodyGetMode(Rid).
public virtual PhysicsServer2D.BodyMode _BodyGetMode(Rid body)
Parameters
body
Rid
Returns
_BodyGetObjectInstanceId(Rid)
Overridable version of BodyGetObjectInstanceId(Rid).
public virtual ulong _BodyGetObjectInstanceId(Rid body)
Parameters
body
Rid
Returns
_BodyGetParam(Rid, BodyParameter)
Overridable version of BodyGetParam(Rid, BodyParameter).
public virtual Variant _BodyGetParam(Rid body, PhysicsServer2D.BodyParameter param)
Parameters
body
Ridparam
PhysicsServer2D.BodyParameter
Returns
_BodyGetShape(Rid, int)
Overridable version of BodyGetShape(Rid, int).
public virtual Rid _BodyGetShape(Rid body, int shapeIdx)
Parameters
Returns
_BodyGetShapeCount(Rid)
Overridable version of BodyGetShapeCount(Rid).
public virtual int _BodyGetShapeCount(Rid body)
Parameters
body
Rid
Returns
_BodyGetShapeTransform(Rid, int)
Overridable version of BodyGetShapeTransform(Rid, int).
public virtual Transform2D _BodyGetShapeTransform(Rid body, int shapeIdx)
Parameters
Returns
_BodyGetSpace(Rid)
Overridable version of BodyGetSpace(Rid).
public virtual Rid _BodyGetSpace(Rid body)
Parameters
body
Rid
Returns
_BodyGetState(Rid, BodyState)
Overridable version of BodyGetState(Rid, BodyState).
public virtual Variant _BodyGetState(Rid body, PhysicsServer2D.BodyState state)
Parameters
body
Ridstate
PhysicsServer2D.BodyState
Returns
_BodyIsOmittingForceIntegration(Rid)
Overridable version of BodyIsOmittingForceIntegration(Rid).
public virtual bool _BodyIsOmittingForceIntegration(Rid body)
Parameters
body
Rid
Returns
_BodyRemoveCollisionException(Rid, Rid)
Overridable version of BodyRemoveCollisionException(Rid, Rid).
public virtual void _BodyRemoveCollisionException(Rid body, Rid exceptedBody)
Parameters
_BodyRemoveShape(Rid, int)
Overridable version of BodyRemoveShape(Rid, int).
public virtual void _BodyRemoveShape(Rid body, int shapeIdx)
Parameters
_BodyResetMassProperties(Rid)
Overridable version of BodyResetMassProperties(Rid).
public virtual void _BodyResetMassProperties(Rid body)
Parameters
body
Rid
_BodySetAxisVelocity(Rid, Vector2)
Overridable version of BodySetAxisVelocity(Rid, Vector2).
public virtual void _BodySetAxisVelocity(Rid body, Vector2 axisVelocity)
Parameters
_BodySetCollisionLayer(Rid, uint)
Overridable version of BodySetCollisionLayer(Rid, uint).
public virtual void _BodySetCollisionLayer(Rid body, uint layer)
Parameters
_BodySetCollisionMask(Rid, uint)
Overridable version of BodySetCollisionMask(Rid, uint).
public virtual void _BodySetCollisionMask(Rid body, uint mask)
Parameters
_BodySetCollisionPriority(Rid, float)
Overridable version of BodySetCollisionPriority(Rid, float).
public virtual void _BodySetCollisionPriority(Rid body, float priority)
Parameters
_BodySetConstantForce(Rid, Vector2)
Overridable version of BodySetConstantForce(Rid, Vector2).
public virtual void _BodySetConstantForce(Rid body, Vector2 force)
Parameters
_BodySetConstantTorque(Rid, float)
Overridable version of BodySetConstantTorque(Rid, float).
public virtual void _BodySetConstantTorque(Rid body, float torque)
Parameters
_BodySetContactsReportedDepthThreshold(Rid, float)
Overridable version of PhysicsServer2D's internal body_set_contacts_reported_depth_threshold
method.
Note: This method is currently unused by Godot's default physics implementation.
public virtual void _BodySetContactsReportedDepthThreshold(Rid body, float threshold)
Parameters
_BodySetContinuousCollisionDetectionMode(Rid, CcdMode)
Overridable version of BodySetContinuousCollisionDetectionMode(Rid, CcdMode).
public virtual void _BodySetContinuousCollisionDetectionMode(Rid body, PhysicsServer2D.CcdMode mode)
Parameters
body
Ridmode
PhysicsServer2D.CcdMode
_BodySetForceIntegrationCallback(Rid, Callable, Variant)
Overridable version of BodySetForceIntegrationCallback(Rid, Callable, Variant).
public virtual void _BodySetForceIntegrationCallback(Rid body, Callable callable, Variant userdata)
Parameters
_BodySetMaxContactsReported(Rid, int)
Overridable version of BodySetMaxContactsReported(Rid, int).
public virtual void _BodySetMaxContactsReported(Rid body, int amount)
Parameters
_BodySetMode(Rid, BodyMode)
Overridable version of BodySetMode(Rid, BodyMode).
public virtual void _BodySetMode(Rid body, PhysicsServer2D.BodyMode mode)
Parameters
body
Ridmode
PhysicsServer2D.BodyMode
_BodySetOmitForceIntegration(Rid, bool)
Overridable version of BodySetOmitForceIntegration(Rid, bool).
public virtual void _BodySetOmitForceIntegration(Rid body, bool enable)
Parameters
_BodySetParam(Rid, BodyParameter, Variant)
Overridable version of BodySetParam(Rid, BodyParameter, Variant).
public virtual void _BodySetParam(Rid body, PhysicsServer2D.BodyParameter param, Variant value)
Parameters
body
Ridparam
PhysicsServer2D.BodyParametervalue
Variant
_BodySetPickable(Rid, bool)
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 InputPickable.
public virtual void _BodySetPickable(Rid body, bool pickable)
Parameters
_BodySetShape(Rid, int, Rid)
Overridable version of BodySetShape(Rid, int, Rid).
public virtual void _BodySetShape(Rid body, int shapeIdx, Rid shape)
Parameters
_BodySetShapeAsOneWayCollision(Rid, int, bool, float)
Overridable version of BodySetShapeAsOneWayCollision(Rid, int, bool, float).
public virtual void _BodySetShapeAsOneWayCollision(Rid body, int shapeIdx, bool enable, float margin)
Parameters
_BodySetShapeDisabled(Rid, int, bool)
Overridable version of BodySetShapeDisabled(Rid, int, bool).
public virtual void _BodySetShapeDisabled(Rid body, int shapeIdx, bool disabled)
Parameters
_BodySetShapeTransform(Rid, int, Transform2D)
Overridable version of BodySetShapeTransform(Rid, int, Transform2D).
public virtual void _BodySetShapeTransform(Rid body, int shapeIdx, Transform2D transform)
Parameters
body
RidshapeIdx
inttransform
Transform2D
_BodySetSpace(Rid, Rid)
Overridable version of BodySetSpace(Rid, Rid).
public virtual void _BodySetSpace(Rid body, Rid space)
Parameters
_BodySetState(Rid, BodyState, Variant)
Overridable version of BodySetState(Rid, BodyState, Variant).
public virtual void _BodySetState(Rid body, PhysicsServer2D.BodyState state, Variant value)
Parameters
body
Ridstate
PhysicsServer2D.BodyStatevalue
Variant
_BodySetStateSyncCallback(Rid, Callable)
Assigns the body
to call the given callable
during the synchronization phase of the loop, before _Step(float) is called. See also _Sync().
Overridable version of PhysicsServer2D's internal body_set_state_sync_callback
method.
public virtual void _BodySetStateSyncCallback(Rid body, Callable callable)
Parameters
_CapsuleShapeCreate()
Overridable version of CapsuleShapeCreate().
public virtual Rid _CapsuleShapeCreate()
Returns
_CircleShapeCreate()
Overridable version of CircleShapeCreate().
public virtual Rid _CircleShapeCreate()
Returns
_ConcavePolygonShapeCreate()
Overridable version of ConcavePolygonShapeCreate().
public virtual Rid _ConcavePolygonShapeCreate()
Returns
_ConvexPolygonShapeCreate()
Overridable version of ConvexPolygonShapeCreate().
public virtual Rid _ConvexPolygonShapeCreate()
Returns
_DampedSpringJointGetParam(Rid, DampedSpringParam)
Overridable version of DampedSpringJointGetParam(Rid, DampedSpringParam).
public virtual float _DampedSpringJointGetParam(Rid joint, PhysicsServer2D.DampedSpringParam param)
Parameters
joint
Ridparam
PhysicsServer2D.DampedSpringParam
Returns
_DampedSpringJointSetParam(Rid, DampedSpringParam, float)
Overridable version of DampedSpringJointSetParam(Rid, DampedSpringParam, float).
public virtual void _DampedSpringJointSetParam(Rid joint, PhysicsServer2D.DampedSpringParam param, float value)
Parameters
joint
Ridparam
PhysicsServer2D.DampedSpringParamvalue
float
_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 _Sync().
Overridable version of PhysicsServer2D's internal end_sync
method.
public virtual void _EndSync()
_Finish()
Called when the main loop finalizes to shut down the physics server. See also _Finalize() and PhysicsServer2DExtension().
Overridable version of PhysicsServer2D's internal finish
method.
public virtual void _Finish()
_FlushQueries()
Called every physics step before _Step(float) to process all remaining queries.
Overridable version of PhysicsServer2D's internal flush_queries
method.
public virtual void _FlushQueries()
_FreeRid(Rid)
Overridable version of FreeRid(Rid).
public virtual void _FreeRid(Rid rid)
Parameters
rid
Rid
_GetProcessInfo(ProcessInfo)
Overridable version of GetProcessInfo(ProcessInfo).
public virtual int _GetProcessInfo(PhysicsServer2D.ProcessInfo processInfo)
Parameters
processInfo
PhysicsServer2D.ProcessInfo
Returns
_Init()
Called when the main loop is initialized and creates a new instance of this physics server. See also _Initialize() and _Finish().
Overridable version of PhysicsServer2D's internal init
method.
public virtual void _Init()
_IsFlushingQueries()
Overridable method that should return true
when the physics server is processing queries. See also _FlushQueries().
Overridable version of PhysicsServer2D's internal is_flushing_queries
method.
public virtual bool _IsFlushingQueries()
Returns
_JointClear(Rid)
Overridable version of JointClear(Rid).
public virtual void _JointClear(Rid joint)
Parameters
joint
Rid
_JointCreate()
Overridable version of JointCreate().
public virtual Rid _JointCreate()
Returns
_JointDisableCollisionsBetweenBodies(Rid, bool)
Overridable version of JointDisableCollisionsBetweenBodies(Rid, bool).
public virtual void _JointDisableCollisionsBetweenBodies(Rid joint, bool disable)
Parameters
_JointGetParam(Rid, JointParam)
Overridable version of JointGetParam(Rid, JointParam).
public virtual float _JointGetParam(Rid joint, PhysicsServer2D.JointParam param)
Parameters
joint
Ridparam
PhysicsServer2D.JointParam
Returns
_JointGetType(Rid)
Overridable version of JointGetType(Rid).
public virtual PhysicsServer2D.JointType _JointGetType(Rid joint)
Parameters
joint
Rid
Returns
_JointIsDisabledCollisionsBetweenBodies(Rid)
Overridable version of JointIsDisabledCollisionsBetweenBodies(Rid).
public virtual bool _JointIsDisabledCollisionsBetweenBodies(Rid joint)
Parameters
joint
Rid
Returns
_JointMakeDampedSpring(Rid, Vector2, Vector2, Rid, Rid)
Overridable version of JointMakeDampedSpring(Rid, Vector2, Vector2, Rid, Rid).
public virtual void _JointMakeDampedSpring(Rid joint, Vector2 anchorA, Vector2 anchorB, Rid bodyA, Rid bodyB)
Parameters
_JointMakeGroove(Rid, Vector2, Vector2, Vector2, Rid, Rid)
Overridable version of JointMakeGroove(Rid, Vector2, Vector2, Vector2, Rid, Rid).
public virtual void _JointMakeGroove(Rid joint, Vector2 aGroove1, Vector2 aGroove2, Vector2 bAnchor, Rid bodyA, Rid bodyB)
Parameters
_JointMakePin(Rid, Vector2, Rid, Rid)
Overridable version of JointMakePin(Rid, Vector2, Rid, Rid).
public virtual void _JointMakePin(Rid joint, Vector2 anchor, Rid bodyA, Rid bodyB)
Parameters
_JointSetParam(Rid, JointParam, float)
Overridable version of JointSetParam(Rid, JointParam, float).
public virtual void _JointSetParam(Rid joint, PhysicsServer2D.JointParam param, float value)
Parameters
joint
Ridparam
PhysicsServer2D.JointParamvalue
float
_PinJointGetFlag(Rid, PinJointFlag)
Overridable version of PinJointGetFlag(Rid, PinJointFlag).
public virtual bool _PinJointGetFlag(Rid joint, PhysicsServer2D.PinJointFlag flag)
Parameters
joint
Ridflag
PhysicsServer2D.PinJointFlag
Returns
_PinJointGetParam(Rid, PinJointParam)
Overridable version of PinJointGetParam(Rid, PinJointParam).
public virtual float _PinJointGetParam(Rid joint, PhysicsServer2D.PinJointParam param)
Parameters
joint
Ridparam
PhysicsServer2D.PinJointParam
Returns
_PinJointSetFlag(Rid, PinJointFlag, bool)
Overridable version of PinJointSetFlag(Rid, PinJointFlag, bool).
public virtual void _PinJointSetFlag(Rid joint, PhysicsServer2D.PinJointFlag flag, bool enabled)
Parameters
joint
Ridflag
PhysicsServer2D.PinJointFlagenabled
bool
_PinJointSetParam(Rid, PinJointParam, float)
Overridable version of PinJointSetParam(Rid, PinJointParam, float).
public virtual void _PinJointSetParam(Rid joint, PhysicsServer2D.PinJointParam param, float value)
Parameters
joint
Ridparam
PhysicsServer2D.PinJointParamvalue
float
_RectangleShapeCreate()
Overridable version of RectangleShapeCreate().
public virtual Rid _RectangleShapeCreate()
Returns
_SegmentShapeCreate()
Overridable version of SegmentShapeCreate().
public virtual Rid _SegmentShapeCreate()
Returns
_SeparationRayShapeCreate()
Overridable version of SeparationRayShapeCreate().
public virtual Rid _SeparationRayShapeCreate()
Returns
_SetActive(bool)
Overridable version of SetActive(bool).
public virtual void _SetActive(bool active)
Parameters
active
bool
_ShapeGetCustomSolverBias(Rid)
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 CustomSolverBias.
public virtual float _ShapeGetCustomSolverBias(Rid shape)
Parameters
shape
Rid
Returns
_ShapeGetData(Rid)
Overridable version of ShapeGetData(Rid).
public virtual Variant _ShapeGetData(Rid shape)
Parameters
shape
Rid
Returns
_ShapeGetType(Rid)
Overridable version of ShapeGetType(Rid).
public virtual PhysicsServer2D.ShapeType _ShapeGetType(Rid shape)
Parameters
shape
Rid
Returns
_ShapeSetCustomSolverBias(Rid, float)
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 CustomSolverBias.
public virtual void _ShapeSetCustomSolverBias(Rid shape, float bias)
Parameters
_ShapeSetData(Rid, Variant)
Overridable version of ShapeSetData(Rid, Variant).
public virtual void _ShapeSetData(Rid shape, Variant data)
Parameters
_SpaceCreate()
Overridable version of SpaceCreate().
public virtual Rid _SpaceCreate()
Returns
_SpaceGetContactCount(Rid)
Should return how many contacts have occurred during the last physics step in the given space
. See also _SpaceGetContacts(Rid) and _SpaceSetDebugContacts(Rid, int).
Overridable version of PhysicsServer2D's internal space_get_contact_count
method.
public virtual int _SpaceGetContactCount(Rid space)
Parameters
space
Rid
Returns
_SpaceGetContacts(Rid)
Should return the positions of all contacts that have occurred during the last physics step in the given space
. See also _SpaceGetContactCount(Rid) and _SpaceSetDebugContacts(Rid, int).
Overridable version of PhysicsServer2D's internal space_get_contacts
method.
public virtual Vector2[] _SpaceGetContacts(Rid space)
Parameters
space
Rid
Returns
- Vector2[]
_SpaceGetDirectState(Rid)
Overridable version of SpaceGetDirectState(Rid).
public virtual PhysicsDirectSpaceState2D _SpaceGetDirectState(Rid space)
Parameters
space
Rid
Returns
_SpaceGetParam(Rid, SpaceParameter)
Overridable version of SpaceGetParam(Rid, SpaceParameter).
public virtual float _SpaceGetParam(Rid space, PhysicsServer2D.SpaceParameter param)
Parameters
space
Ridparam
PhysicsServer2D.SpaceParameter
Returns
_SpaceIsActive(Rid)
Overridable version of SpaceIsActive(Rid).
public virtual bool _SpaceIsActive(Rid space)
Parameters
space
Rid
Returns
_SpaceSetActive(Rid, bool)
Overridable version of SpaceSetActive(Rid, bool).
public virtual void _SpaceSetActive(Rid space, bool active)
Parameters
_SpaceSetDebugContacts(Rid, int)
Used internally to allow the given space
to store contact points, up to maxContacts
. This is automatically set for the main World2D's space when 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.
public virtual void _SpaceSetDebugContacts(Rid space, int maxContacts)
Parameters
_SpaceSetParam(Rid, SpaceParameter, float)
Overridable version of SpaceSetParam(Rid, SpaceParameter, float).
public virtual void _SpaceSetParam(Rid space, PhysicsServer2D.SpaceParameter param, float value)
Parameters
space
Ridparam
PhysicsServer2D.SpaceParametervalue
float
_Step(float)
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 GetPhysicsProcessDeltaTime().
Overridable version of PhysicsServer2D's internal step
method.
public virtual void _Step(float step)
Parameters
step
float
_Sync()
Called to indicate that the physics server is synchronizing and cannot access physics states if running on a separate thread. See also _EndSync().
Overridable version of PhysicsServer2D's internal sync
method.
public virtual void _Sync()
_WorldBoundaryShapeCreate()
Overridable version of WorldBoundaryShapeCreate().
public virtual Rid _WorldBoundaryShapeCreate()