Skip to content

PhysicsServer2D

Eduard Gushchin edited this page Jul 1, 2026 · 5 revisions

Home | API by Category | Complete API Index | API Compatibility

Field Value
Full name Electron2D.PhysicsServer2D
Namespace Electron2D
Kind class
Category Physics

Overview

Provides the Electron2D server boundary for low-level 2D physics objects.

Syntax

public static class Electron2D.PhysicsServer2D

Godot 4.7 C# profile compatibility

Profile: Electron2D 0.1.0 2D
Status: Partial / Not verified
Out of profile: yes
Godot reference: PhysicsServer2D

Low-level 2D physics server facade for RID allocation, spaces, shape kinds and internal backend swapping; no real simulation yet.

Remarks

PhysicsServer2D creates and manipulates physics resources through opaque Electron2D.Rid values. The public API does not expose Box2D.NET or any other concrete backend handle.

Electron2D 0.1.0 Preview implements the server resource boundary only. Physical bodies, shape data, contacts and queries are added by later physics tasks.

Thread Safety

Calls are serialized through an internal lock. Backend replacement is an internal startup/test operation and should not be performed while physics is stepping.

Since

This type is available since Electron2D 0.1.0 Preview.

Members

Member Kind Summary
AreaCreate() Method Creates a new 2D area object.
BodyCreate() Method Creates a new 2D body object.
CapsuleShapeCreate() Method Creates a capsule shape.
CircleShapeCreate() Method Creates a circle shape.
ConcavePolygonShapeCreate() Method Creates a concave polygon shape.
ConvexPolygonShapeCreate() Method Creates a convex polygon shape.
FreeRid(Electron2D.Rid) Method Frees a physics server RID.
GetProcessInfo(Electron2D.PhysicsServer2D.ProcessInfo) Method Gets a physics process statistic.
JointCreate() Method Creates a new 2D joint object.
RectangleShapeCreate() Method Creates a rectangle shape.
SegmentShapeCreate() Method Creates a segment shape.
SeparationRayShapeCreate() Method Creates a separation ray shape.
SetActive(System.Boolean) Method Activates or deactivates physics processing in the active backend.
ShapeGetType(Electron2D.Rid) Method Gets the Electron2D shape type stored for a physics shape RID.
SpaceCreate() Method Creates a new 2D physics space.
SpaceGetParam(Electron2D.Rid, Electron2D.PhysicsServer2D.SpaceParameter) Method Gets a numeric parameter from a physics space.
SpaceIsActive(Electron2D.Rid) Method Checks whether a physics space is active.
SpaceSetActive(Electron2D.Rid, System.Boolean) Method Sets whether a physics space is active.
SpaceSetParam(Electron2D.Rid, Electron2D.PhysicsServer2D.SpaceParameter, System.Single) Method Sets a numeric parameter on a physics space.
WorldBoundaryShapeCreate() Method Creates a world boundary shape.

Member Details

AreaCreate()

Kind: Method

public static Electron2D.Rid AreaCreate()()

Summary

Creates a new 2D area object.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

A Electron2D.Rid identifying the created area.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.PhysicsServer2D

BodyCreate()

Kind: Method

public static Electron2D.Rid BodyCreate()()

Summary

Creates a new 2D body object.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

A Electron2D.Rid identifying the created body.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.PhysicsServer2D

CapsuleShapeCreate()

Kind: Method

public static Electron2D.Rid CapsuleShapeCreate()()

Summary

Creates a capsule shape.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

A Electron2D.Rid identifying the created shape.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.PhysicsServer2D

CircleShapeCreate()

Kind: Method

public static Electron2D.Rid CircleShapeCreate()()

Summary

Creates a circle shape.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

A Electron2D.Rid identifying the created shape.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.PhysicsServer2D

ConcavePolygonShapeCreate()

Kind: Method

public static Electron2D.Rid ConcavePolygonShapeCreate()()

Summary

Creates a concave polygon shape.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

A Electron2D.Rid identifying the created shape.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.PhysicsServer2D

ConvexPolygonShapeCreate()

Kind: Method

public static Electron2D.Rid ConvexPolygonShapeCreate()()

Summary

Creates a convex polygon shape.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

A Electron2D.Rid identifying the created shape.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.PhysicsServer2D

FreeRid(Electron2D.Rid)

Kind: Method

public static System.Void FreeRid(Electron2D.Rid)(Electron2D.Rid rid)

Summary

Frees a physics server RID.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • rid: The RID to free.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.PhysicsServer2D

GetProcessInfo(Electron2D.PhysicsServer2D.ProcessInfo)

Kind: Method

public static System.Int32 GetProcessInfo(Electron2D.PhysicsServer2D.ProcessInfo)(Electron2D.PhysicsServer2D.ProcessInfo processInfo)

Summary

Gets a physics process statistic.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • processInfo: The statistic to read.

Returns

The current statistic value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.PhysicsServer2D

JointCreate()

Kind: Method

public static Electron2D.Rid JointCreate()()

Summary

Creates a new 2D joint object.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

A Electron2D.Rid identifying the created joint.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.PhysicsServer2D

RectangleShapeCreate()

Kind: Method

public static Electron2D.Rid RectangleShapeCreate()()

Summary

Creates a rectangle shape.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

A Electron2D.Rid identifying the created shape.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.PhysicsServer2D

SegmentShapeCreate()

Kind: Method

public static Electron2D.Rid SegmentShapeCreate()()

Summary

Creates a segment shape.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

A Electron2D.Rid identifying the created shape.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.PhysicsServer2D

SeparationRayShapeCreate()

Kind: Method

public static Electron2D.Rid SeparationRayShapeCreate()()

Summary

Creates a separation ray shape.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

A Electron2D.Rid identifying the created shape.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.PhysicsServer2D

SetActive(System.Boolean)

Kind: Method

public static System.Void SetActive(System.Boolean)(System.Boolean active)

Summary

Activates or deactivates physics processing in the active backend.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • active: Whether the physics server should process physics objects.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.PhysicsServer2D

ShapeGetType(Electron2D.Rid)

Kind: Method

public static Electron2D.PhysicsServer2D.ShapeType ShapeGetType(Electron2D.Rid)(Electron2D.Rid shape)

Summary

Gets the Electron2D shape type stored for a physics shape RID.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • shape: The shape to query.

Returns

The type of the shape.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.PhysicsServer2D

SpaceCreate()

Kind: Method

public static Electron2D.Rid SpaceCreate()()

Summary

Creates a new 2D physics space.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

A Electron2D.Rid identifying the created space.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.PhysicsServer2D

SpaceGetParam(Electron2D.Rid, Electron2D.PhysicsServer2D.SpaceParameter)

Kind: Method

public static System.Single SpaceGetParam(Electron2D.Rid, Electron2D.PhysicsServer2D.SpaceParameter)(Electron2D.Rid space, Electron2D.PhysicsServer2D.SpaceParameter param)

Summary

Gets a numeric parameter from a physics space.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • space: The space to query.
  • param: The parameter to read.

Returns

The stored parameter value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.PhysicsServer2D

SpaceIsActive(Electron2D.Rid)

Kind: Method

public static System.Boolean SpaceIsActive(Electron2D.Rid)(Electron2D.Rid space)

Summary

Checks whether a physics space is active.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • space: The space to query.

Returns

true when the space is active; otherwise, false.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.PhysicsServer2D

SpaceSetActive(Electron2D.Rid, System.Boolean)

Kind: Method

public static System.Void SpaceSetActive(Electron2D.Rid, System.Boolean)(Electron2D.Rid space, System.Boolean active)

Summary

Sets whether a physics space is active.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • space: The space to update.
  • active: Whether the space should be active.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.PhysicsServer2D

SpaceSetParam(Electron2D.Rid, Electron2D.PhysicsServer2D.SpaceParameter, System.Single)

Kind: Method

public static System.Void SpaceSetParam(Electron2D.Rid, Electron2D.PhysicsServer2D.SpaceParameter, System.Single)(Electron2D.Rid space, Electron2D.PhysicsServer2D.SpaceParameter param, System.Single value)

Summary

Sets a numeric parameter on a physics space.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • space: The space to update.
  • param: The parameter to update.
  • value: The new parameter value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.PhysicsServer2D

WorldBoundaryShapeCreate()

Kind: Method

public static Electron2D.Rid WorldBoundaryShapeCreate()()

Summary

Creates a world boundary shape.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

A Electron2D.Rid identifying the created shape.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.PhysicsServer2D

Clone this wiki locally