Index · Object → PhysicsServer2D → PhysicsServer2DExtension

PhysicsServer2DExtension

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

Class 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

func _area_add_shape(area: RID, shape: RID, transform: Transform2D, disabled: bool) -> void

Overridable version of PhysicsServer2D.area_add_shape().

func _area_attach_canvas_instance_id(area: RID, id: int) -> void

Overridable version of PhysicsServer2D.area_attach_canvas_instance_id().

func _area_attach_object_instance_id(area: RID, id: int) -> void

Overridable version of PhysicsServer2D.area_attach_object_instance_id().

func _area_clear_shapes(area: RID) -> void

Overridable version of PhysicsServer2D.area_clear_shapes().

func _area_create() -> RID

Overridable version of PhysicsServer2D.area_create().

func _area_get_canvas_instance_id(area: RID) -> int

Overridable version of PhysicsServer2D.area_get_canvas_instance_id().

func _area_get_collision_layer(area: RID) -> int

Overridable version of PhysicsServer2D.area_get_collision_layer().

func _area_get_collision_mask(area: RID) -> int

Overridable version of PhysicsServer2D.area_get_collision_mask().

func _area_get_object_instance_id(area: RID) -> int

Overridable version of PhysicsServer2D.area_get_object_instance_id().

func _area_get_param(area: RID, param: PhysicsServer2D.AreaParameter) -> Variant

Overridable version of PhysicsServer2D.area_get_param().

func _area_get_shape(area: RID, shape_idx: int) -> RID

Overridable version of PhysicsServer2D.area_get_shape().

func _area_get_shape_count(area: RID) -> int

Overridable version of PhysicsServer2D.area_get_shape_count().

func _area_get_shape_transform(area: RID, shape_idx: int) -> Transform2D

Overridable version of PhysicsServer2D.area_get_shape_transform().

func _area_get_space(area: RID) -> RID

Overridable version of PhysicsServer2D.area_get_space().

func _area_get_transform(area: RID) -> Transform2D

Overridable version of PhysicsServer2D.area_get_transform().

func _area_remove_shape(area: RID, shape_idx: int) -> void

Overridable version of PhysicsServer2D.area_remove_shape().

func _area_set_area_monitor_callback(area: RID, callback: Callable) -> void

Overridable version of PhysicsServer2D.area_set_area_monitor_callback().

func _area_set_collision_layer(area: RID, layer: int) -> void

Overridable version of PhysicsServer2D.area_set_collision_layer().

func _area_set_collision_mask(area: RID, mask: int) -> void

Overridable version of PhysicsServer2D.area_set_collision_mask().

func _area_set_monitor_callback(area: RID, callback: Callable) -> void

Overridable version of PhysicsServer2D.area_set_monitor_callback().

func _area_set_monitorable(area: RID, monitorable: bool) -> void

Overridable version of PhysicsServer2D.area_set_monitorable().

func _area_set_param(area: RID, param: PhysicsServer2D.AreaParameter, value: Variant) -> void

Overridable version of PhysicsServer2D.area_set_param().

func _area_set_pickable(area: RID, pickable: bool) -> void

If set to true, allows the area with the given RID to detect mouse inputs when the mouse cursor is hovering on it.

Overridable version of PhysicsServer2D's internal area_set_pickable method. Corresponds to CollisionObject2D.input_pickable.

func _area_set_shape(area: RID, shape_idx: int, shape: RID) -> void

Overridable version of PhysicsServer2D.area_set_shape().

func _area_set_shape_disabled(area: RID, shape_idx: int, disabled: bool) -> void

Overridable version of PhysicsServer2D.area_set_shape_disabled().

func _area_set_shape_transform(area: RID, shape_idx: int, transform: Transform2D) -> void

Overridable version of PhysicsServer2D.area_set_shape_transform().

func _area_set_space(area: RID, space: RID) -> void

Overridable version of PhysicsServer2D.area_set_space().

func _area_set_transform(area: RID, transform: Transform2D) -> void

Overridable version of PhysicsServer2D.area_set_transform().

func _body_add_collision_exception(body: RID, excepted_body: RID) -> void

Overridable version of PhysicsServer2D.body_add_collision_exception().

func _body_add_constant_central_force(body: RID, force: Vector2) -> void

Overridable version of PhysicsServer2D.body_add_constant_central_force().

func _body_add_constant_force(body: RID, force: Vector2, position: Vector2) -> void

Overridable version of PhysicsServer2D.body_add_constant_force().

func _body_add_constant_torque(body: RID, torque: float) -> void

Overridable version of PhysicsServer2D.body_add_constant_torque().

func _body_add_shape(body: RID, shape: RID, transform: Transform2D, disabled: bool) -> void

Overridable version of PhysicsServer2D.body_add_shape().

func _body_apply_central_force(body: RID, force: Vector2) -> void

Overridable version of PhysicsServer2D.body_apply_central_force().

func _body_apply_central_impulse(body: RID, impulse: Vector2) -> void

Overridable version of PhysicsServer2D.body_apply_central_impulse().

func _body_apply_force(body: RID, force: Vector2, position: Vector2) -> void

Overridable version of PhysicsServer2D.body_apply_force().

func _body_apply_impulse(body: RID, impulse: Vector2, position: Vector2) -> void

Overridable version of PhysicsServer2D.body_apply_impulse().

func _body_apply_torque(body: RID, torque: float) -> void

Overridable version of PhysicsServer2D.body_apply_torque().

func _body_apply_torque_impulse(body: RID, impulse: float) -> void

Overridable version of PhysicsServer2D.body_apply_torque_impulse().

func _body_attach_canvas_instance_id(body: RID, id: int) -> void

Overridable version of PhysicsServer2D.body_attach_canvas_instance_id().

func _body_attach_object_instance_id(body: RID, id: int) -> void

Overridable version of PhysicsServer2D.body_attach_object_instance_id().

func _body_clear_shapes(body: RID) -> void

Overridable version of PhysicsServer2D.body_clear_shapes().

func _body_collide_shape(body: RID, body_shape: int, shape: RID, shape_xform: Transform2D, motion: Vector2, r_results: void*, result_max: int, r_result_count: int32_t*) -> bool

Given a body, a shape, and their respective parameters, this method should return true if a collision between the two would occur, with additional details passed in r_results.

Overridable version of PhysicsServer2D's internal shape_collide method. Corresponds to PhysicsDirectSpaceState2D.collide_shape().

func _body_create() -> RID

Overridable version of PhysicsServer2D.body_create().

func _body_get_canvas_instance_id(body: RID) -> int

Overridable version of PhysicsServer2D.body_get_canvas_instance_id().

func _body_get_collision_exceptions(body: RID) -> RID[]

Returns the RIDs of all bodies added as collision exceptions for the given body. See also _body_add_collision_exception() and _body_remove_collision_exception().

Overridable version of PhysicsServer2D's internal body_get_collision_exceptions method. Corresponds to PhysicsBody2D.get_collision_exceptions().

func _body_get_collision_layer(body: RID) -> int

Overridable version of PhysicsServer2D.body_get_collision_layer().

func _body_get_collision_mask(body: RID) -> int

Overridable version of PhysicsServer2D.body_get_collision_mask().

func _body_get_collision_priority(body: RID) -> float

Overridable version of PhysicsServer2D.body_get_collision_priority().

func _body_get_constant_force(body: RID) -> Vector2

Overridable version of PhysicsServer2D.body_get_constant_force().

func _body_get_constant_torque(body: RID) -> float

Overridable version of PhysicsServer2D.body_get_constant_torque().

func _body_get_contacts_reported_depth_threshold(body: RID) -> float

Overridable version of PhysicsServer2D's internal body_get_contacts_reported_depth_threshold method.

Note: This method is currently unused by Godot's default physics implementation.

func _body_get_continuous_collision_detection_mode(body: RID) -> PhysicsServer2D.CCDMode

Overridable version of PhysicsServer2D.body_get_continuous_collision_detection_mode().

func _body_get_direct_state(body: RID) -> PhysicsDirectBodyState2D

Overridable version of PhysicsServer2D.body_get_direct_state().

func _body_get_max_contacts_reported(body: RID) -> int

Overridable version of PhysicsServer2D.body_get_max_contacts_reported().

func _body_get_mode(body: RID) -> PhysicsServer2D.BodyMode

Overridable version of PhysicsServer2D.body_get_mode().

func _body_get_object_instance_id(body: RID) -> int

Overridable version of PhysicsServer2D.body_get_object_instance_id().

func _body_get_param(body: RID, param: PhysicsServer2D.BodyParameter) -> Variant

Overridable version of PhysicsServer2D.body_get_param().

func _body_get_shape(body: RID, shape_idx: int) -> RID

Overridable version of PhysicsServer2D.body_get_shape().

func _body_get_shape_count(body: RID) -> int

Overridable version of PhysicsServer2D.body_get_shape_count().

func _body_get_shape_transform(body: RID, shape_idx: int) -> Transform2D

Overridable version of PhysicsServer2D.body_get_shape_transform().

func _body_get_space(body: RID) -> RID

Overridable version of PhysicsServer2D.body_get_space().

func _body_get_state(body: RID, state: PhysicsServer2D.BodyState) -> Variant

Overridable version of PhysicsServer2D.body_get_state().

func _body_is_omitting_force_integration(body: RID) -> bool

Overridable version of PhysicsServer2D.body_is_omitting_force_integration().

func _body_remove_collision_exception(body: RID, excepted_body: RID) -> void

Overridable version of PhysicsServer2D.body_remove_collision_exception().

func _body_remove_shape(body: RID, shape_idx: int) -> void

Overridable version of PhysicsServer2D.body_remove_shape().

func _body_reset_mass_properties(body: RID) -> void

Overridable version of PhysicsServer2D.body_reset_mass_properties().

func _body_set_axis_velocity(body: RID, axis_velocity: Vector2) -> void

Overridable version of PhysicsServer2D.body_set_axis_velocity().

func _body_set_collision_layer(body: RID, layer: int) -> void

Overridable version of PhysicsServer2D.body_set_collision_layer().

func _body_set_collision_mask(body: RID, mask: int) -> void

Overridable version of PhysicsServer2D.body_set_collision_mask().

func _body_set_collision_priority(body: RID, priority: float) -> void

Overridable version of PhysicsServer2D.body_set_collision_priority().

func _body_set_constant_force(body: RID, force: Vector2) -> void

Overridable version of PhysicsServer2D.body_set_constant_force().

func _body_set_constant_torque(body: RID, torque: float) -> void

Overridable version of PhysicsServer2D.body_set_constant_torque().

func _body_set_contacts_reported_depth_threshold(body: RID, threshold: float) -> void

Overridable version of PhysicsServer2D's internal body_set_contacts_reported_depth_threshold method.

Note: This method is currently unused by Godot's default physics implementation.

func _body_set_continuous_collision_detection_mode(body: RID, mode: PhysicsServer2D.CCDMode) -> void

Overridable version of PhysicsServer2D.body_set_continuous_collision_detection_mode().

func _body_set_force_integration_callback(body: RID, callable: Callable, userdata: Variant) -> void

Overridable version of PhysicsServer2D.body_set_force_integration_callback().

func _body_set_max_contacts_reported(body: RID, amount: int) -> void

Overridable version of PhysicsServer2D.body_set_max_contacts_reported().

func _body_set_mode(body: RID, mode: PhysicsServer2D.BodyMode) -> void

Overridable version of PhysicsServer2D.body_set_mode().

func _body_set_omit_force_integration(body: RID, enable: bool) -> void

Overridable version of PhysicsServer2D.body_set_omit_force_integration().

func _body_set_param(body: RID, param: PhysicsServer2D.BodyParameter, value: Variant) -> void

Overridable version of PhysicsServer2D.body_set_param().

func _body_set_pickable(body: RID, pickable: bool) -> void

If set to true, allows the body with the given RID to detect mouse inputs when the mouse cursor is hovering on it.

Overridable version of PhysicsServer2D's internal body_set_pickable method. Corresponds to CollisionObject2D.input_pickable.

func _body_set_shape(body: RID, shape_idx: int, shape: RID) -> void

Overridable version of PhysicsServer2D.body_set_shape().

func _body_set_shape_as_one_way_collision(body: RID, shape_idx: int, enable: bool, margin: float, direction: Vector2) -> void

Overridable version of PhysicsServer2D.body_set_shape_as_one_way_collision().

func _body_set_shape_disabled(body: RID, shape_idx: int, disabled: bool) -> void

Overridable version of PhysicsServer2D.body_set_shape_disabled().

func _body_set_shape_transform(body: RID, shape_idx: int, transform: Transform2D) -> void

Overridable version of PhysicsServer2D.body_set_shape_transform().

func _body_set_space(body: RID, space: RID) -> void

Overridable version of PhysicsServer2D.body_set_space().

func _body_set_state(body: RID, state: PhysicsServer2D.BodyState, value: Variant) -> void

Overridable version of PhysicsServer2D.body_set_state().

func _body_set_state_sync_callback(body: RID, callable: Callable) -> void

Assigns the body to call the given callable during the synchronization phase of the loop, before _step() is called. See also _sync().

Overridable version of PhysicsServer2D.body_set_state_sync_callback().

func _body_test_motion(body: RID, from: Transform2D, motion: Vector2, margin: float, collide_separation_ray: bool, recovery_as_collision: bool, r_result: PhysicsServer2DExtensionMotionResult*) -> bool

Overridable version of PhysicsServer2D.body_test_motion(). Unlike the exposed implementation, this method does not receive all of the arguments inside a PhysicsTestMotionParameters2D.

func _capsule_shape_create() -> RID

Overridable version of PhysicsServer2D.capsule_shape_create().

func _circle_shape_create() -> RID

Overridable version of PhysicsServer2D.circle_shape_create().

func _concave_polygon_shape_create() -> RID

Overridable version of PhysicsServer2D.concave_polygon_shape_create().

func _convex_polygon_shape_create() -> RID

Overridable version of PhysicsServer2D.convex_polygon_shape_create().

func _damped_spring_joint_get_param(joint: RID, param: PhysicsServer2D.DampedSpringParam) -> float

Overridable version of PhysicsServer2D.damped_spring_joint_get_param().

func _damped_spring_joint_set_param(joint: RID, param: PhysicsServer2D.DampedSpringParam, value: float) -> void

Overridable version of PhysicsServer2D.damped_spring_joint_set_param().

func _end_sync() -> void

Called to indicate that the physics server has stopped synchronizing. It is in the loop's iteration/physics phase, and can access physics objects even if running on a separate thread. See also _sync().

Overridable version of PhysicsServer2D's internal end_sync method.

func _finish() -> void

Called when the main loop finalizes to shut down the physics server. See also MainLoop._finalize() and _init().

Overridable version of PhysicsServer2D's internal finish method.

func _flush_queries() -> void

Called every physics step before _step() to process all remaining queries.

Overridable version of PhysicsServer2D's internal flush_queries method.

func _free_rid(rid: RID) -> void

Overridable version of PhysicsServer2D.free_rid().

func _get_process_info(process_info: PhysicsServer2D.ProcessInfo) -> int

Overridable version of PhysicsServer2D.get_process_info().

func _init() -> void

Called when the main loop is initialized and creates a new instance of this physics server. See also MainLoop._initialize() and _finish().

Overridable version of PhysicsServer2D's internal init method.

func _is_flushing_queries() -> bool

Overridable method that should return true when the physics server is processing queries. See also _flush_queries().

Overridable version of PhysicsServer2D's internal is_flushing_queries method.

func _joint_clear(joint: RID) -> void

Overridable version of PhysicsServer2D.joint_clear().

func _joint_create() -> RID

Overridable version of PhysicsServer2D.joint_create().

func _joint_disable_collisions_between_bodies(joint: RID, disable: bool) -> void

Overridable version of PhysicsServer2D.joint_disable_collisions_between_bodies().

func _joint_get_param(joint: RID, param: PhysicsServer2D.JointParam) -> float

Overridable version of PhysicsServer2D.joint_get_param().

func _joint_get_type(joint: RID) -> PhysicsServer2D.JointType

Overridable version of PhysicsServer2D.joint_get_type().

func _joint_is_disabled_collisions_between_bodies(joint: RID) -> bool

Overridable version of PhysicsServer2D.joint_is_disabled_collisions_between_bodies().

func _joint_make_damped_spring(joint: RID, anchor_a: Vector2, anchor_b: Vector2, body_a: RID, body_b: RID) -> void

Overridable version of PhysicsServer2D.joint_make_damped_spring().

func _joint_make_groove(joint: RID, a_groove1: Vector2, a_groove2: Vector2, b_anchor: Vector2, body_a: RID, body_b: RID) -> void

Overridable version of PhysicsServer2D.joint_make_groove().

func _joint_make_pin(joint: RID, anchor: Vector2, body_a: RID, body_b: RID) -> void

Overridable version of PhysicsServer2D.joint_make_pin().

func _joint_set_param(joint: RID, param: PhysicsServer2D.JointParam, value: float) -> void

Overridable version of PhysicsServer2D.joint_set_param().

func _pin_joint_get_flag(joint: RID, flag: PhysicsServer2D.PinJointFlag) -> bool

Overridable version of PhysicsServer2D.pin_joint_get_flag().

func _pin_joint_get_param(joint: RID, param: PhysicsServer2D.PinJointParam) -> float

Overridable version of PhysicsServer2D.pin_joint_get_param().

func _pin_joint_set_flag(joint: RID, flag: PhysicsServer2D.PinJointFlag, enabled: bool) -> void

Overridable version of PhysicsServer2D.pin_joint_set_flag().

func _pin_joint_set_param(joint: RID, param: PhysicsServer2D.PinJointParam, value: float) -> void

Overridable version of PhysicsServer2D.pin_joint_set_param().

func _rectangle_shape_create() -> RID

Overridable version of PhysicsServer2D.rectangle_shape_create().

func _segment_shape_create() -> RID

Overridable version of PhysicsServer2D.segment_shape_create().

func _separation_ray_shape_create() -> RID

Overridable version of PhysicsServer2D.separation_ray_shape_create().

func _set_active(active: bool) -> void

Overridable version of PhysicsServer2D.set_active().

func _shape_collide(shape_A: RID, xform_A: Transform2D, motion_A: Vector2, shape_B: RID, xform_B: Transform2D, motion_B: Vector2, r_results: void*, result_max: int, r_result_count: int32_t*) -> bool

Given two shapes and their parameters, should return true if a collision between the two would occur, with additional details passed in r_results.

Overridable version of PhysicsServer2D's internal shape_collide method. Corresponds to PhysicsDirectSpaceState2D.collide_shape().

func _shape_get_custom_solver_bias(shape: RID) -> float

Should return the custom solver bias of the given shape, which defines how much bodies are forced to separate on contact when this shape is involved.

Overridable version of PhysicsServer2D's internal shape_get_custom_solver_bias method. Corresponds to Shape2D.custom_solver_bias.

func _shape_get_data(shape: RID) -> Variant

Overridable version of PhysicsServer2D.shape_get_data().

func _shape_get_type(shape: RID) -> PhysicsServer2D.ShapeType

Overridable version of PhysicsServer2D.shape_get_type().

func _shape_set_custom_solver_bias(shape: RID, bias: float) -> void

Should set the custom solver bias for the given shape. It defines how much bodies are forced to separate on contact.

Overridable version of PhysicsServer2D's internal shape_get_custom_solver_bias method. Corresponds to Shape2D.custom_solver_bias.

func _shape_set_data(shape: RID, data: Variant) -> void

Overridable version of PhysicsServer2D.shape_set_data().

func _space_create() -> RID

Overridable version of PhysicsServer2D.space_create().

func _space_get_contact_count(space: RID) -> int

Should return how many contacts have occurred during the last physics step in the given space. See also _space_get_contacts() and _space_set_debug_contacts().

Overridable version of PhysicsServer2D's internal space_get_contact_count method.

func _space_get_contacts(space: RID) -> PackedVector2Array

Should return the positions of all contacts that have occurred during the last physics step in the given space. See also _space_get_contact_count() and _space_set_debug_contacts().

Overridable version of PhysicsServer2D's internal space_get_contacts method.

func _space_get_direct_state(space: RID) -> PhysicsDirectSpaceState2D

Overridable version of PhysicsServer2D.space_get_direct_state().

func _space_get_param(space: RID, param: PhysicsServer2D.SpaceParameter) -> float

Overridable version of PhysicsServer2D.space_get_param().

func _space_is_active(space: RID) -> bool

Overridable version of PhysicsServer2D.space_is_active().

func _space_set_active(space: RID, active: bool) -> void

Overridable version of PhysicsServer2D.space_set_active().

func _space_set_debug_contacts(space: RID, max_contacts: int) -> void

Used internally to allow the given space to store contact points, up to max_contacts. This is automatically set for the main World2D's space when SceneTree.debug_collisions_hint is true, or by checking "Visible Collision Shapes" in the editor. Only works in debug builds.

Overridable version of PhysicsServer2D's internal space_set_debug_contacts method.

func _space_set_param(space: RID, param: PhysicsServer2D.SpaceParameter, value: float) -> void

Overridable version of PhysicsServer2D.space_set_param().

func _step(step: float) -> void

Called every physics step to process the physics simulation. step is the time elapsed since the last physics step, in seconds. It is usually the same as the value returned by Node.get_physics_process_delta_time().

Overridable version of PhysicsServer2D's internal [code skip-lint]step[/code] method.

func _sync() -> void

Called to indicate that the physics server is synchronizing and cannot access physics states if running on a separate thread. See also _end_sync().

Overridable version of PhysicsServer2D's internal sync method.

func _world_boundary_shape_create() -> RID

Overridable version of PhysicsServer2D.world_boundary_shape_create().

func body_test_motion_is_excluding_body(body: RID) -> bool

Returns true if the body with the given RID is being excluded from _body_test_motion(). See also Object.get_instance_id().

func body_test_motion_is_excluding_object(object: int) -> bool

Returns true if the object with the given instance ID is being excluded from _body_test_motion(). See also Object.get_instance_id().

Inherited from PhysicsServer2D (119)
func area_add_shape(area: RID, shape: RID, transform: Transform2D = Transform2D(1, 0, 0, 1, 0, 0), disabled: bool = false) -> void
func area_attach_canvas_instance_id(area: RID, id: int) -> void
func area_attach_object_instance_id(area: RID, id: int) -> void
func area_clear_shapes(area: RID) -> void
func area_create() -> RID
func area_get_shape(area: RID, shape_idx: int) -> RID
func area_get_shape_transform(area: RID, shape_idx: int) -> Transform2D
func area_get_space(area: RID) -> RID
func area_remove_shape(area: RID, shape_idx: int) -> void
func area_set_area_monitor_callback(area: RID, callback: Callable) -> void
func area_set_collision_layer(area: RID, layer: int) -> void
func area_set_collision_mask(area: RID, mask: int) -> void
func area_set_monitor_callback(area: RID, callback: Callable) -> void
func area_set_monitorable(area: RID, monitorable: bool) -> void
func area_set_param(area: RID, param: PhysicsServer2D.AreaParameter, value: Variant) -> void
func area_set_shape(area: RID, shape_idx: int, shape: RID) -> void
func area_set_shape_disabled(area: RID, shape_idx: int, disabled: bool) -> void
func area_set_shape_transform(area: RID, shape_idx: int, transform: Transform2D) -> void
func area_set_space(area: RID, space: RID) -> void
func area_set_transform(area: RID, transform: Transform2D) -> void
func body_add_collision_exception(body: RID, excepted_body: RID) -> void
func body_add_constant_central_force(body: RID, force: Vector2) -> void
func body_add_constant_force(body: RID, force: Vector2, position: Vector2 = Vector2(0, 0)) -> void
func body_add_constant_torque(body: RID, torque: float) -> void
func body_add_shape(body: RID, shape: RID, transform: Transform2D = Transform2D(1, 0, 0, 1, 0, 0), disabled: bool = false) -> void
func body_apply_central_force(body: RID, force: Vector2) -> void
func body_apply_central_impulse(body: RID, impulse: Vector2) -> void
func body_apply_force(body: RID, force: Vector2, position: Vector2 = Vector2(0, 0)) -> void
func body_apply_impulse(body: RID, impulse: Vector2, position: Vector2 = Vector2(0, 0)) -> void
func body_apply_torque(body: RID, torque: float) -> void
func body_apply_torque_impulse(body: RID, impulse: float) -> void
func body_attach_canvas_instance_id(body: RID, id: int) -> void
func body_attach_object_instance_id(body: RID, id: int) -> void
func body_clear_shapes(body: RID) -> void
func body_create() -> RID
func body_get_shape(body: RID, shape_idx: int) -> RID
func body_get_shape_transform(body: RID, shape_idx: int) -> Transform2D
func body_get_space(body: RID) -> RID
func body_remove_collision_exception(body: RID, excepted_body: RID) -> void
func body_remove_shape(body: RID, shape_idx: int) -> void
func body_reset_mass_properties(body: RID) -> void
func body_set_axis_velocity(body: RID, axis_velocity: Vector2) -> void
func body_set_collision_layer(body: RID, layer: int) -> void
func body_set_collision_mask(body: RID, mask: int) -> void
func body_set_collision_priority(body: RID, priority: float) -> void
func body_set_constant_force(body: RID, force: Vector2) -> void
func body_set_constant_torque(body: RID, torque: float) -> void
func body_set_force_integration_callback(body: RID, callable: Callable, userdata: Variant = null) -> void
func body_set_max_contacts_reported(body: RID, amount: int) -> void
func body_set_mode(body: RID, mode: PhysicsServer2D.BodyMode) -> void
func body_set_omit_force_integration(body: RID, enable: bool) -> void
func body_set_param(body: RID, param: PhysicsServer2D.BodyParameter, value: Variant) -> void
func body_set_shape(body: RID, shape_idx: int, shape: RID) -> void
func body_set_shape_as_one_way_collision(body: RID, shape_idx: int, enable: bool, margin: float, direction: Vector2 = Vector2(0, 1)) -> void
func body_set_shape_disabled(body: RID, shape_idx: int, disabled: bool) -> void
func body_set_shape_transform(body: RID, shape_idx: int, transform: Transform2D) -> void
func body_set_space(body: RID, space: RID) -> void
func body_set_state(body: RID, state: PhysicsServer2D.BodyState, value: Variant) -> void
func body_set_state_sync_callback(body: RID, callable: Callable) -> void
func free_rid(rid: RID) -> void
func joint_clear(joint: RID) -> void
func joint_create() -> RID
func joint_disable_collisions_between_bodies(joint: RID, disable: bool) -> void
func joint_make_damped_spring(joint: RID, anchor_a: Vector2, anchor_b: Vector2, body_a: RID, body_b: RID = RID()) -> void
func joint_make_groove(joint: RID, groove1_a: Vector2, groove2_a: Vector2, anchor_b: Vector2, body_a: RID = RID(), body_b: RID = RID()) -> void
func joint_make_pin(joint: RID, anchor: Vector2, body_a: RID, body_b: RID = RID()) -> void
func joint_set_param(joint: RID, param: PhysicsServer2D.JointParam, value: float) -> void
func pin_joint_set_flag(joint: RID, flag: PhysicsServer2D.PinJointFlag, enabled: bool) -> void
func pin_joint_set_param(joint: RID, param: PhysicsServer2D.PinJointParam, value: float) -> void
func set_active(active: bool) -> void
func shape_get_data(shape: RID) -> Variant
func shape_set_data(shape: RID, data: Variant) -> void
func space_create() -> RID
func space_is_active(space: RID) -> bool
func space_set_active(space: RID, active: bool) -> void
func space_set_param(space: RID, param: PhysicsServer2D.SpaceParameter, value: float) -> void
Inherited from Object (62)
func _get(property: StringName) -> Variant
func _get_property_list() -> Dictionary[]
func _init() -> void
func _iter_get(iter: Variant) -> Variant
func _iter_init(iter: Array) -> bool
func _iter_next(iter: Array) -> bool
func _notification(what: int) -> void
func _set(property: StringName, value: Variant) -> bool
func _to_string() -> String
func _validate_property(property: Dictionary) -> void
func add_user_signal(signal: String, arguments: Array = []) -> void
func call(method: StringName) -> Variant
func callv(method: StringName, arg_array: Array) -> Variant
func cancel_free() -> void
func connect(signal: StringName, callable: Callable, flags: int = 0) -> Error
func disconnect(signal: StringName, callable: Callable) -> void
func emit_signal(signal: StringName) -> Error
func free() -> void
func get(property: StringName) -> Variant
func get_class() -> String
func get_incoming_connections() -> Dictionary[]
func get_indexed(property_path: NodePath) -> Variant
func get_meta(name: StringName, default: Variant = null) -> Variant
func get_meta_list() -> StringName[]
func get_method_list() -> Dictionary[]
func get_property_list() -> Dictionary[]
func get_signal_connection_list(signal: StringName) -> Dictionary[]
func get_signal_list() -> Dictionary[]
func has_meta(name: StringName) -> bool
func has_method(method: StringName) -> bool
func has_signal(signal: StringName) -> bool
func is_class(class: StringName) -> bool
func is_connected(signal: StringName, callable: Callable) -> bool
func notification(what: int, reversed: bool = false) -> void
func remove_meta(name: StringName) -> void
func remove_user_signal(signal: StringName) -> void
func set(property: StringName, value: Variant) -> void
func set_block_signals(enable: bool) -> void
func set_deferred(property: StringName, value: Variant) -> void
func set_indexed(property_path: NodePath, value: Variant) -> void
func set_message_translation(enable: bool) -> void
func set_meta(name: StringName, value: Variant) -> void
func set_script(script: Variant) -> void
func set_translation_domain(domain: StringName) -> void
func to_string() -> String
func tr(message: StringName, context: StringName = &"") -> String
func tr_n(message: StringName, plural_message: StringName, n: int, context: StringName = &"") -> String

Signals

Inherited from Object (2)