Class PhysicsDirectSpaceState2DExtension
Provides virtual methods that can be overridden to create custom PhysicsDirectSpaceState2D implementations.
- Inheritance
-
PhysicsDirectSpaceState2DExtension
Remarks
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
_cast_motion(RID, Transform2D, Vector2, float, int, bool, bool, float*, float*)
Qualifiers: virtual
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)
Parameters
shape_rid
RIDtransform
Transform2Dmotion
Vector2margin
floatcollision_mask
intcollide_with_bodies
boolcollide_with_areas
boolclosest_safe
float*closest_unsafe
float*
_collide_shape(RID, Transform2D, Vector2, float, int, bool, bool, void*, int, int32_t*)
Qualifiers: virtual
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)
Parameters
shape_rid
RIDtransform
Transform2Dmotion
Vector2margin
floatcollision_mask
intcollide_with_bodies
boolcollide_with_areas
boolresults
void*max_results
intresult_count
int32_t*
_intersect_point(Vector2, int, int, bool, bool, PhysicsServer2DExtensionShapeResult*, int)
Qualifiers: virtual
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)
Parameters
position
Vector2canvas_instance_id
intcollision_mask
intcollide_with_bodies
boolcollide_with_areas
boolresults
PhysicsServer2DExtensionShapeResult*max_results
int
_intersect_ray(Vector2, Vector2, int, bool, bool, bool, PhysicsServer2DExtensionRayResult*)
Qualifiers: virtual
bool _intersect_ray(Vector2 from, Vector2 to, int collision_mask, bool collide_with_bodies, bool collide_with_areas, bool hit_from_inside, PhysicsServer2DExtensionRayResult* result)
Parameters
from
Vector2to
Vector2collision_mask
intcollide_with_bodies
boolcollide_with_areas
boolhit_from_inside
boolresult
PhysicsServer2DExtensionRayResult*
_intersect_shape(RID, Transform2D, Vector2, float, int, bool, bool, PhysicsServer2DExtensionShapeResult*, int)
Qualifiers: virtual
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)
Parameters
shape_rid
RIDtransform
Transform2Dmotion
Vector2margin
floatcollision_mask
intcollide_with_bodies
boolcollide_with_areas
boolresult
PhysicsServer2DExtensionShapeResult*max_results
int
_rest_info(RID, Transform2D, Vector2, float, int, bool, bool, PhysicsServer2DExtensionShapeRestInfo*)
Qualifiers: virtual
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)
Parameters
shape_rid
RIDtransform
Transform2Dmotion
Vector2margin
floatcollision_mask
intcollide_with_bodies
boolcollide_with_areas
boolrest_info
PhysicsServer2DExtensionShapeRestInfo*
is_body_excluded_from_query(RID)
Qualifiers: const
bool is_body_excluded_from_query(RID body)
Parameters
body
RID