Class reference

PhysicsDirectSpaceState2DExtension

Inherits PhysicsDirectSpaceState2D

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

Description

This class extends PhysicsDirectSpaceState2D 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 PhysicsDirectSpaceState2D.

Methods

bool _cast_motion(RID shape_rid, Transform2D transform, Vector2 motion, float margin, int collision_mask, bool collide_with_bodies, bool collide_with_areas, float* closest_safe, float* closest_unsafe) virtual required

bool _collide_shape(RID shape_rid, Transform2D transform, Vector2 motion, float margin, int collision_mask, bool collide_with_bodies, bool collide_with_areas, void* results, int max_results, int32_t* result_count) virtual required

int _intersect_point(Vector2 position, int canvas_instance_id, int collision_mask, bool collide_with_bodies, bool collide_with_areas, PhysicsServer2DExtensionShapeResult* results, int max_results) virtual required

bool _intersect_ray(Vector2 from, Vector2 to, int collision_mask, bool collide_with_bodies, bool collide_with_areas, bool hit_from_inside, PhysicsServer2DExtensionRayResult* result) virtual required

int _intersect_shape(RID shape_rid, Transform2D transform, Vector2 motion, float margin, int collision_mask, bool collide_with_bodies, bool collide_with_areas, PhysicsServer2DExtensionShapeResult* result, int max_results) virtual required

bool _rest_info(RID shape_rid, Transform2D transform, Vector2 motion, float margin, int collision_mask, bool collide_with_bodies, bool collide_with_areas, PhysicsServer2DExtensionShapeRestInfo* rest_info) virtual required

bool is_body_excluded_from_query(RID body) const

Source revision 5592dc3a7a61
Connection interrupted. Reload×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.