Skip to content

PhysicsDirectSpaceState2D

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

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

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

Overview

Provides direct 2D physics queries for a Electron2D.World2D.

Syntax

public sealed class Electron2D.PhysicsDirectSpaceState2D : Electron2D.Object

Godot 4.7 C# profile compatibility

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

Managed AABB baseline for IntersectRay, IntersectPoint and IntersectShape over active CollisionShape2D nodes.

Remarks

Electron2D 0.1.0 Preview implements a managed AABB query baseline over active Electron2D.CollisionShape2D nodes. The result format follows the Electron2D dynamic dictionary/array surface and does not expose backend handles.

Thread Safety

This type is not synchronized. Call it on the main scene thread.

Since

This type is available since Electron2D 0.1.0 Preview.

Members

Member Kind Summary
IntersectPoint(Electron2D.PhysicsPointQueryParameters2D, System.Int32) Method Finds physics objects whose active shapes contain a point.
IntersectRay(Electron2D.PhysicsRayQueryParameters2D) Method Intersects a ray segment with the current 2D physics shapes.
IntersectShape(Electron2D.PhysicsShapeQueryParameters2D, System.Int32) Method Finds physics objects whose active shapes intersect a query shape.

Member Details

IntersectPoint(Electron2D.PhysicsPointQueryParameters2D, System.Int32)

Kind: Method

public Electron2D.Collections.Array IntersectPoint(Electron2D.PhysicsPointQueryParameters2D, System.Int32)(Electron2D.PhysicsPointQueryParameters2D parameters, System.Int32 maxResults)

Summary

Finds physics objects whose active shapes contain a point.

Remarks

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

Parameters

  • parameters: Point query parameters.
  • maxResults: Maximum number of result dictionaries to return.

Returns

An array of dictionaries describing matching objects.

Exceptions

  • System.ArgumentNullException: Thrown when parameters is null.
  • System.ArgumentOutOfRangeException: Thrown when maxResults is negative.

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.PhysicsDirectSpaceState2D

IntersectRay(Electron2D.PhysicsRayQueryParameters2D)

Kind: Method

public Electron2D.Collections.Dictionary IntersectRay(Electron2D.PhysicsRayQueryParameters2D)(Electron2D.PhysicsRayQueryParameters2D parameters)

Summary

Intersects a ray segment with the current 2D physics shapes.

Remarks

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

Parameters

  • parameters: Ray query parameters.

Returns

A dictionary with hit data, or an empty dictionary when the ray hits nothing.

Exceptions

  • System.ArgumentNullException: Thrown when parameters is null.

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.PhysicsDirectSpaceState2D

IntersectShape(Electron2D.PhysicsShapeQueryParameters2D, System.Int32)

Kind: Method

public Electron2D.Collections.Array IntersectShape(Electron2D.PhysicsShapeQueryParameters2D, System.Int32)(Electron2D.PhysicsShapeQueryParameters2D parameters, System.Int32 maxResults)

Summary

Finds physics objects whose active shapes intersect a query shape.

Remarks

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

Parameters

  • parameters: Shape query parameters.
  • maxResults: Maximum number of result dictionaries to return.

Returns

An array of dictionaries describing matching objects.

Exceptions

  • System.ArgumentNullException: Thrown when parameters is null.
  • System.ArgumentOutOfRangeException: Thrown when maxResults is negative.

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.PhysicsDirectSpaceState2D

Clone this wiki locally