Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

PhysicsServer2DExtension

Inherits: PhysicsServer2D < Object

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

Description

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.

Methods

void

_area_add_shape(area: RID, shape: RID, transform: Transform2D, disabled: bool) virtual

void

_area_attach_canvas_instance_id(area: RID, id: int) virtual

void

_area_attach_object_instance_id(area: RID, id: int) virtual

void

_area_clear_shapes(area: RID) virtual

RID

_area_create() virtual

int

_area_get_canvas_instance_id(area: RID) virtual const

int

_area_get_collision_layer(area: RID) virtual const

int

_area_get_collision_mask(area: RID) virtual const

int

_area_get_object_instance_id(area: RID) virtual const

Variant

_area_get_param(area: RID, param: AreaParameter) virtual const

RID

_area_get_shape(area: RID, shape_idx: int) virtual const

int

_area_get_shape_count(area: RID) virtual const

Transform2D

_area_get_shape_transform(area: RID, shape_idx: int) virtual const

RID

_area_get_space(area: RID) virtual const

Transform2D

_area_get_transform(area: RID) virtual const

void

_area_remove_shape(area: RID, shape_idx: int) virtual

void

_area_set_area_monitor_callback(area: RID, callback: Callable) virtual

void

_area_set_collision_layer(area: RID, layer: int) virtual

void

_area_set_collision_mask(area: RID, mask: int) virtual

void

_area_set_monitor_callback(area: RID, callback: Callable) virtual

void

_area_set_monitorable(area: RID, monitorable: bool) virtual

void

_area_set_param(area: RID, param: AreaParameter, value: Variant) virtual

void

_area_set_pickable(area: RID, pickable: bool) virtual

void

_area_set_shape(area: RID, shape_idx: int, shape: RID) virtual