classref: Sync with latest 4.0-dev

This commit is contained in:
Rémi Verschelde
2021-11-15 12:28:38 +01:00
parent d6d97aaf5e
commit 30193215cf
829 changed files with 12891 additions and 7761 deletions

View File

@@ -1,6 +1,6 @@
:github_url: hide
.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
.. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
.. DO NOT EDIT THIS FILE, but the PhysicsServer2D.xml source instead.
.. The source is found in doc/classes or modules/<name>/doc_classes.
@@ -21,215 +21,211 @@ PhysicsServer2D is the server responsible for all 2D physics. It can create many
Methods
-------
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_add_shape<class_PhysicsServer2D_method_area_add_shape>` **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` shape, :ref:`Transform2D<class_Transform2D>` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`bool<class_bool>` disabled=false **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_attach_canvas_instance_id<class_PhysicsServer2D_method_area_attach_canvas_instance_id>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` id **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_attach_object_instance_id<class_PhysicsServer2D_method_area_attach_object_instance_id>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` id **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_clear_shapes<class_PhysicsServer2D_method_area_clear_shapes>` **(** :ref:`RID<class_RID>` area **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`area_create<class_PhysicsServer2D_method_area_create>` **(** **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`area_get_canvas_instance_id<class_PhysicsServer2D_method_area_get_canvas_instance_id>` **(** :ref:`RID<class_RID>` area **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`area_get_object_instance_id<class_PhysicsServer2D_method_area_get_object_instance_id>` **(** :ref:`RID<class_RID>` area **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`area_get_param<class_PhysicsServer2D_method_area_get_param>` **(** :ref:`RID<class_RID>` area, :ref:`AreaParameter<enum_PhysicsServer2D_AreaParameter>` param **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`area_get_shape<class_PhysicsServer2D_method_area_get_shape>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`area_get_shape_count<class_PhysicsServer2D_method_area_get_shape_count>` **(** :ref:`RID<class_RID>` area **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Transform2D<class_Transform2D>` | :ref:`area_get_shape_transform<class_PhysicsServer2D_method_area_get_shape_transform>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`area_get_space<class_PhysicsServer2D_method_area_get_space>` **(** :ref:`RID<class_RID>` area **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`AreaSpaceOverrideMode<enum_PhysicsServer2D_AreaSpaceOverrideMode>` | :ref:`area_get_space_override_mode<class_PhysicsServer2D_method_area_get_space_override_mode>` **(** :ref:`RID<class_RID>` area **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Transform2D<class_Transform2D>` | :ref:`area_get_transform<class_PhysicsServer2D_method_area_get_transform>` **(** :ref:`RID<class_RID>` area **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_remove_shape<class_PhysicsServer2D_method_area_remove_shape>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_set_area_monitor_callback<class_PhysicsServer2D_method_area_set_area_monitor_callback>` **(** :ref:`RID<class_RID>` area, :ref:`Object<class_Object>` receiver, :ref:`StringName<class_StringName>` method **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_set_collision_layer<class_PhysicsServer2D_method_area_set_collision_layer>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` layer **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_set_collision_mask<class_PhysicsServer2D_method_area_set_collision_mask>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` mask **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_set_monitor_callback<class_PhysicsServer2D_method_area_set_monitor_callback>` **(** :ref:`RID<class_RID>` area, :ref:`Object<class_Object>` receiver, :ref:`StringName<class_StringName>` method **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_set_monitorable<class_PhysicsServer2D_method_area_set_monitorable>` **(** :ref:`RID<class_RID>` area, :ref:`bool<class_bool>` monitorable **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_set_param<class_PhysicsServer2D_method_area_set_param>` **(** :ref:`RID<class_RID>` area, :ref:`AreaParameter<enum_PhysicsServer2D_AreaParameter>` param, :ref:`Variant<class_Variant>` value **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_set_shape<class_PhysicsServer2D_method_area_set_shape>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`RID<class_RID>` shape **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_set_shape_disabled<class_PhysicsServer2D_method_area_set_shape_disabled>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` disabled **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_set_shape_transform<class_PhysicsServer2D_method_area_set_shape_transform>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`Transform2D<class_Transform2D>` transform **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_set_space<class_PhysicsServer2D_method_area_set_space>` **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` space **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_set_space_override_mode<class_PhysicsServer2D_method_area_set_space_override_mode>` **(** :ref:`RID<class_RID>` area, :ref:`AreaSpaceOverrideMode<enum_PhysicsServer2D_AreaSpaceOverrideMode>` mode **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_set_transform<class_PhysicsServer2D_method_area_set_transform>` **(** :ref:`RID<class_RID>` area, :ref:`Transform2D<class_Transform2D>` transform **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_add_central_force<class_PhysicsServer2D_method_body_add_central_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` force **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_add_collision_exception<class_PhysicsServer2D_method_body_add_collision_exception>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` excepted_body **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_add_force<class_PhysicsServer2D_method_body_add_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position=Vector2(0, 0) **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_add_shape<class_PhysicsServer2D_method_body_add_shape>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` shape, :ref:`Transform2D<class_Transform2D>` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`bool<class_bool>` disabled=false **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_add_torque<class_PhysicsServer2D_method_body_add_torque>` **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` torque **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_apply_central_impulse<class_PhysicsServer2D_method_body_apply_central_impulse>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` impulse **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_apply_impulse<class_PhysicsServer2D_method_body_apply_impulse>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` impulse, :ref:`Vector2<class_Vector2>` position=Vector2(0, 0) **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_apply_torque_impulse<class_PhysicsServer2D_method_body_apply_torque_impulse>` **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` impulse **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_attach_canvas_instance_id<class_PhysicsServer2D_method_body_attach_canvas_instance_id>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` id **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_attach_object_instance_id<class_PhysicsServer2D_method_body_attach_object_instance_id>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` id **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_clear_shapes<class_PhysicsServer2D_method_body_clear_shapes>` **(** :ref:`RID<class_RID>` body **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`body_create<class_PhysicsServer2D_method_body_create>` **(** **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`body_get_canvas_instance_id<class_PhysicsServer2D_method_body_get_canvas_instance_id>` **(** :ref:`RID<class_RID>` body **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`body_get_collision_layer<class_PhysicsServer2D_method_body_get_collision_layer>` **(** :ref:`RID<class_RID>` body **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`body_get_collision_mask<class_PhysicsServer2D_method_body_get_collision_mask>` **(** :ref:`RID<class_RID>` body **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`CCDMode<enum_PhysicsServer2D_CCDMode>` | :ref:`body_get_continuous_collision_detection_mode<class_PhysicsServer2D_method_body_get_continuous_collision_detection_mode>` **(** :ref:`RID<class_RID>` body **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>` | :ref:`body_get_direct_state<class_PhysicsServer2D_method_body_get_direct_state>` **(** :ref:`RID<class_RID>` body **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`body_get_max_contacts_reported<class_PhysicsServer2D_method_body_get_max_contacts_reported>` **(** :ref:`RID<class_RID>` body **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`BodyMode<enum_PhysicsServer2D_BodyMode>` | :ref:`body_get_mode<class_PhysicsServer2D_method_body_get_mode>` **(** :ref:`RID<class_RID>` body **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`body_get_object_instance_id<class_PhysicsServer2D_method_body_get_object_instance_id>` **(** :ref:`RID<class_RID>` body **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`body_get_param<class_PhysicsServer2D_method_body_get_param>` **(** :ref:`RID<class_RID>` body, :ref:`BodyParameter<enum_PhysicsServer2D_BodyParameter>` param **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`body_get_shape<class_PhysicsServer2D_method_body_get_shape>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`body_get_shape_count<class_PhysicsServer2D_method_body_get_shape_count>` **(** :ref:`RID<class_RID>` body **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Transform2D<class_Transform2D>` | :ref:`body_get_shape_transform<class_PhysicsServer2D_method_body_get_shape_transform>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`body_get_space<class_PhysicsServer2D_method_body_get_space>` **(** :ref:`RID<class_RID>` body **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`body_get_state<class_PhysicsServer2D_method_body_get_state>` **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer2D_BodyState>` state **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`body_is_omitting_force_integration<class_PhysicsServer2D_method_body_is_omitting_force_integration>` **(** :ref:`RID<class_RID>` body **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_remove_collision_exception<class_PhysicsServer2D_method_body_remove_collision_exception>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` excepted_body **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_remove_shape<class_PhysicsServer2D_method_body_remove_shape>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_reset_mass_properties<class_PhysicsServer2D_method_body_reset_mass_properties>` **(** :ref:`RID<class_RID>` body **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_axis_velocity<class_PhysicsServer2D_method_body_set_axis_velocity>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` axis_velocity **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_collision_layer<class_PhysicsServer2D_method_body_set_collision_layer>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` layer **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_collision_mask<class_PhysicsServer2D_method_body_set_collision_mask>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` mask **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_continuous_collision_detection_mode<class_PhysicsServer2D_method_body_set_continuous_collision_detection_mode>` **(** :ref:`RID<class_RID>` body, :ref:`CCDMode<enum_PhysicsServer2D_CCDMode>` mode **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_force_integration_callback<class_PhysicsServer2D_method_body_set_force_integration_callback>` **(** :ref:`RID<class_RID>` body, :ref:`Callable<class_Callable>` callable, :ref:`Variant<class_Variant>` userdata=null **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_max_contacts_reported<class_PhysicsServer2D_method_body_set_max_contacts_reported>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` amount **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_mode<class_PhysicsServer2D_method_body_set_mode>` **(** :ref:`RID<class_RID>` body, :ref:`BodyMode<enum_PhysicsServer2D_BodyMode>` mode **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_omit_force_integration<class_PhysicsServer2D_method_body_set_omit_force_integration>` **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_param<class_PhysicsServer2D_method_body_set_param>` **(** :ref:`RID<class_RID>` body, :ref:`BodyParameter<enum_PhysicsServer2D_BodyParameter>` param, :ref:`Variant<class_Variant>` value **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_shape<class_PhysicsServer2D_method_body_set_shape>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`RID<class_RID>` shape **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_shape_as_one_way_collision<class_PhysicsServer2D_method_body_set_shape_as_one_way_collision>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` enable, :ref:`float<class_float>` margin **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_shape_disabled<class_PhysicsServer2D_method_body_set_shape_disabled>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` disabled **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_shape_transform<class_PhysicsServer2D_method_body_set_shape_transform>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`Transform2D<class_Transform2D>` transform **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_space<class_PhysicsServer2D_method_body_set_space>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` space **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_state<class_PhysicsServer2D_method_body_set_state>` **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer2D_BodyState>` state, :ref:`Variant<class_Variant>` value **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`body_test_motion<class_PhysicsServer2D_method_body_test_motion>` **(** :ref:`RID<class_RID>` body, :ref:`PhysicsTestMotionParameters2D<class_PhysicsTestMotionParameters2D>` parameters, :ref:`PhysicsTestMotionResult2D<class_PhysicsTestMotionResult2D>` result=null **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`capsule_shape_create<class_PhysicsServer2D_method_capsule_shape_create>` **(** **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`circle_shape_create<class_PhysicsServer2D_method_circle_shape_create>` **(** **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`concave_polygon_shape_create<class_PhysicsServer2D_method_concave_polygon_shape_create>` **(** **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`convex_polygon_shape_create<class_PhysicsServer2D_method_convex_polygon_shape_create>` **(** **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`damped_spring_joint_get_param<class_PhysicsServer2D_method_damped_spring_joint_get_param>` **(** :ref:`RID<class_RID>` joint, :ref:`DampedSpringParam<enum_PhysicsServer2D_DampedSpringParam>` param **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`damped_spring_joint_set_param<class_PhysicsServer2D_method_damped_spring_joint_set_param>` **(** :ref:`RID<class_RID>` joint, :ref:`DampedSpringParam<enum_PhysicsServer2D_DampedSpringParam>` param, :ref:`float<class_float>` value **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`free_rid<class_PhysicsServer2D_method_free_rid>` **(** :ref:`RID<class_RID>` rid **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_process_info<class_PhysicsServer2D_method_get_process_info>` **(** :ref:`ProcessInfo<enum_PhysicsServer2D_ProcessInfo>` process_info **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`joint_clear<class_PhysicsServer2D_method_joint_clear>` **(** :ref:`RID<class_RID>` joint **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`joint_create<class_PhysicsServer2D_method_joint_create>` **(** **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`joint_get_param<class_PhysicsServer2D_method_joint_get_param>` **(** :ref:`RID<class_RID>` joint, :ref:`JointParam<enum_PhysicsServer2D_JointParam>` param **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`JointType<enum_PhysicsServer2D_JointType>` | :ref:`joint_get_type<class_PhysicsServer2D_method_joint_get_type>` **(** :ref:`RID<class_RID>` joint **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`joint_make_damped_spring<class_PhysicsServer2D_method_joint_make_damped_spring>` **(** :ref:`RID<class_RID>` joint, :ref:`Vector2<class_Vector2>` anchor_a, :ref:`Vector2<class_Vector2>` anchor_b, :ref:`RID<class_RID>` body_a, :ref:`RID<class_RID>` body_b **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`joint_make_groove<class_PhysicsServer2D_method_joint_make_groove>` **(** :ref:`RID<class_RID>` joint, :ref:`Vector2<class_Vector2>` groove1_a, :ref:`Vector2<class_Vector2>` groove2_a, :ref:`Vector2<class_Vector2>` anchor_b, :ref:`RID<class_RID>` body_a, :ref:`RID<class_RID>` body_b **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`joint_make_pin<class_PhysicsServer2D_method_joint_make_pin>` **(** :ref:`RID<class_RID>` joint, :ref:`Vector2<class_Vector2>` anchor, :ref:`RID<class_RID>` body_a, :ref:`RID<class_RID>` body_b **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`joint_set_param<class_PhysicsServer2D_method_joint_set_param>` **(** :ref:`RID<class_RID>` joint, :ref:`JointParam<enum_PhysicsServer2D_JointParam>` param, :ref:`float<class_float>` value **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`rectangle_shape_create<class_PhysicsServer2D_method_rectangle_shape_create>` **(** **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`segment_shape_create<class_PhysicsServer2D_method_segment_shape_create>` **(** **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`separation_ray_shape_create<class_PhysicsServer2D_method_separation_ray_shape_create>` **(** **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_active<class_PhysicsServer2D_method_set_active>` **(** :ref:`bool<class_bool>` active **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_collision_iterations<class_PhysicsServer2D_method_set_collision_iterations>` **(** :ref:`int<class_int>` iterations **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`shape_get_data<class_PhysicsServer2D_method_shape_get_data>` **(** :ref:`RID<class_RID>` shape **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`ShapeType<enum_PhysicsServer2D_ShapeType>` | :ref:`shape_get_type<class_PhysicsServer2D_method_shape_get_type>` **(** :ref:`RID<class_RID>` shape **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`shape_set_data<class_PhysicsServer2D_method_shape_set_data>` **(** :ref:`RID<class_RID>` shape, :ref:`Variant<class_Variant>` data **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`space_create<class_PhysicsServer2D_method_space_create>` **(** **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` | :ref:`space_get_direct_state<class_PhysicsServer2D_method_space_get_direct_state>` **(** :ref:`RID<class_RID>` space **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`space_get_param<class_PhysicsServer2D_method_space_get_param>` **(** :ref:`RID<class_RID>` space, :ref:`SpaceParameter<enum_PhysicsServer2D_SpaceParameter>` param **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`space_is_active<class_PhysicsServer2D_method_space_is_active>` **(** :ref:`RID<class_RID>` space **)** |const| |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`space_set_active<class_PhysicsServer2D_method_space_set_active>` **(** :ref:`RID<class_RID>` space, :ref:`bool<class_bool>` active **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`space_set_param<class_PhysicsServer2D_method_space_set_param>` **(** :ref:`RID<class_RID>` space, :ref:`SpaceParameter<enum_PhysicsServer2D_SpaceParameter>` param, :ref:`float<class_float>` value **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`world_boundary_shape_create<class_PhysicsServer2D_method_world_boundary_shape_create>` **(** **)** |
+--------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_add_shape<class_PhysicsServer2D_method_area_add_shape>` **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` shape, :ref:`Transform2D<class_Transform2D>` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`bool<class_bool>` disabled=false **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_attach_canvas_instance_id<class_PhysicsServer2D_method_area_attach_canvas_instance_id>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` id **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_attach_object_instance_id<class_PhysicsServer2D_method_area_attach_object_instance_id>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` id **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_clear_shapes<class_PhysicsServer2D_method_area_clear_shapes>` **(** :ref:`RID<class_RID>` area **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`area_create<class_PhysicsServer2D_method_area_create>` **(** **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`area_get_canvas_instance_id<class_PhysicsServer2D_method_area_get_canvas_instance_id>` **(** :ref:`RID<class_RID>` area **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`area_get_object_instance_id<class_PhysicsServer2D_method_area_get_object_instance_id>` **(** :ref:`RID<class_RID>` area **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`area_get_param<class_PhysicsServer2D_method_area_get_param>` **(** :ref:`RID<class_RID>` area, :ref:`AreaParameter<enum_PhysicsServer2D_AreaParameter>` param **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`area_get_shape<class_PhysicsServer2D_method_area_get_shape>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`area_get_shape_count<class_PhysicsServer2D_method_area_get_shape_count>` **(** :ref:`RID<class_RID>` area **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Transform2D<class_Transform2D>` | :ref:`area_get_shape_transform<class_PhysicsServer2D_method_area_get_shape_transform>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`area_get_space<class_PhysicsServer2D_method_area_get_space>` **(** :ref:`RID<class_RID>` area **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Transform2D<class_Transform2D>` | :ref:`area_get_transform<class_PhysicsServer2D_method_area_get_transform>` **(** :ref:`RID<class_RID>` area **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_remove_shape<class_PhysicsServer2D_method_area_remove_shape>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_set_area_monitor_callback<class_PhysicsServer2D_method_area_set_area_monitor_callback>` **(** :ref:`RID<class_RID>` area, :ref:`Callable<class_Callable>` callback **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_set_collision_layer<class_PhysicsServer2D_method_area_set_collision_layer>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` layer **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_set_collision_mask<class_PhysicsServer2D_method_area_set_collision_mask>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` mask **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_set_monitor_callback<class_PhysicsServer2D_method_area_set_monitor_callback>` **(** :ref:`RID<class_RID>` area, :ref:`Callable<class_Callable>` callback **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_set_monitorable<class_PhysicsServer2D_method_area_set_monitorable>` **(** :ref:`RID<class_RID>` area, :ref:`bool<class_bool>` monitorable **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_set_param<class_PhysicsServer2D_method_area_set_param>` **(** :ref:`RID<class_RID>` area, :ref:`AreaParameter<enum_PhysicsServer2D_AreaParameter>` param, :ref:`Variant<class_Variant>` value **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_set_shape<class_PhysicsServer2D_method_area_set_shape>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`RID<class_RID>` shape **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_set_shape_disabled<class_PhysicsServer2D_method_area_set_shape_disabled>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` disabled **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_set_shape_transform<class_PhysicsServer2D_method_area_set_shape_transform>` **(** :ref:`RID<class_RID>` area, :ref:`int<class_int>` shape_idx, :ref:`Transform2D<class_Transform2D>` transform **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_set_space<class_PhysicsServer2D_method_area_set_space>` **(** :ref:`RID<class_RID>` area, :ref:`RID<class_RID>` space **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`area_set_transform<class_PhysicsServer2D_method_area_set_transform>` **(** :ref:`RID<class_RID>` area, :ref:`Transform2D<class_Transform2D>` transform **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_add_central_force<class_PhysicsServer2D_method_body_add_central_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` force **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_add_collision_exception<class_PhysicsServer2D_method_body_add_collision_exception>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` excepted_body **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_add_force<class_PhysicsServer2D_method_body_add_force>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` force, :ref:`Vector2<class_Vector2>` position=Vector2(0, 0) **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_add_shape<class_PhysicsServer2D_method_body_add_shape>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` shape, :ref:`Transform2D<class_Transform2D>` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`bool<class_bool>` disabled=false **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_add_torque<class_PhysicsServer2D_method_body_add_torque>` **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` torque **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_apply_central_impulse<class_PhysicsServer2D_method_body_apply_central_impulse>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` impulse **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_apply_impulse<class_PhysicsServer2D_method_body_apply_impulse>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` impulse, :ref:`Vector2<class_Vector2>` position=Vector2(0, 0) **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_apply_torque_impulse<class_PhysicsServer2D_method_body_apply_torque_impulse>` **(** :ref:`RID<class_RID>` body, :ref:`float<class_float>` impulse **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_attach_canvas_instance_id<class_PhysicsServer2D_method_body_attach_canvas_instance_id>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` id **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_attach_object_instance_id<class_PhysicsServer2D_method_body_attach_object_instance_id>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` id **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_clear_shapes<class_PhysicsServer2D_method_body_clear_shapes>` **(** :ref:`RID<class_RID>` body **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`body_create<class_PhysicsServer2D_method_body_create>` **(** **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`body_get_canvas_instance_id<class_PhysicsServer2D_method_body_get_canvas_instance_id>` **(** :ref:`RID<class_RID>` body **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`body_get_collision_layer<class_PhysicsServer2D_method_body_get_collision_layer>` **(** :ref:`RID<class_RID>` body **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`body_get_collision_mask<class_PhysicsServer2D_method_body_get_collision_mask>` **(** :ref:`RID<class_RID>` body **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`CCDMode<enum_PhysicsServer2D_CCDMode>` | :ref:`body_get_continuous_collision_detection_mode<class_PhysicsServer2D_method_body_get_continuous_collision_detection_mode>` **(** :ref:`RID<class_RID>` body **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>` | :ref:`body_get_direct_state<class_PhysicsServer2D_method_body_get_direct_state>` **(** :ref:`RID<class_RID>` body **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`body_get_max_contacts_reported<class_PhysicsServer2D_method_body_get_max_contacts_reported>` **(** :ref:`RID<class_RID>` body **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`BodyMode<enum_PhysicsServer2D_BodyMode>` | :ref:`body_get_mode<class_PhysicsServer2D_method_body_get_mode>` **(** :ref:`RID<class_RID>` body **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`body_get_object_instance_id<class_PhysicsServer2D_method_body_get_object_instance_id>` **(** :ref:`RID<class_RID>` body **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`body_get_param<class_PhysicsServer2D_method_body_get_param>` **(** :ref:`RID<class_RID>` body, :ref:`BodyParameter<enum_PhysicsServer2D_BodyParameter>` param **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`body_get_shape<class_PhysicsServer2D_method_body_get_shape>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`body_get_shape_count<class_PhysicsServer2D_method_body_get_shape_count>` **(** :ref:`RID<class_RID>` body **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Transform2D<class_Transform2D>` | :ref:`body_get_shape_transform<class_PhysicsServer2D_method_body_get_shape_transform>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`body_get_space<class_PhysicsServer2D_method_body_get_space>` **(** :ref:`RID<class_RID>` body **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`body_get_state<class_PhysicsServer2D_method_body_get_state>` **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer2D_BodyState>` state **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`body_is_omitting_force_integration<class_PhysicsServer2D_method_body_is_omitting_force_integration>` **(** :ref:`RID<class_RID>` body **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_remove_collision_exception<class_PhysicsServer2D_method_body_remove_collision_exception>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` excepted_body **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_remove_shape<class_PhysicsServer2D_method_body_remove_shape>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_reset_mass_properties<class_PhysicsServer2D_method_body_reset_mass_properties>` **(** :ref:`RID<class_RID>` body **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_axis_velocity<class_PhysicsServer2D_method_body_set_axis_velocity>` **(** :ref:`RID<class_RID>` body, :ref:`Vector2<class_Vector2>` axis_velocity **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_collision_layer<class_PhysicsServer2D_method_body_set_collision_layer>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` layer **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_collision_mask<class_PhysicsServer2D_method_body_set_collision_mask>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` mask **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_continuous_collision_detection_mode<class_PhysicsServer2D_method_body_set_continuous_collision_detection_mode>` **(** :ref:`RID<class_RID>` body, :ref:`CCDMode<enum_PhysicsServer2D_CCDMode>` mode **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_force_integration_callback<class_PhysicsServer2D_method_body_set_force_integration_callback>` **(** :ref:`RID<class_RID>` body, :ref:`Callable<class_Callable>` callable, :ref:`Variant<class_Variant>` userdata=null **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_max_contacts_reported<class_PhysicsServer2D_method_body_set_max_contacts_reported>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` amount **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_mode<class_PhysicsServer2D_method_body_set_mode>` **(** :ref:`RID<class_RID>` body, :ref:`BodyMode<enum_PhysicsServer2D_BodyMode>` mode **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_omit_force_integration<class_PhysicsServer2D_method_body_set_omit_force_integration>` **(** :ref:`RID<class_RID>` body, :ref:`bool<class_bool>` enable **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_param<class_PhysicsServer2D_method_body_set_param>` **(** :ref:`RID<class_RID>` body, :ref:`BodyParameter<enum_PhysicsServer2D_BodyParameter>` param, :ref:`Variant<class_Variant>` value **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_shape<class_PhysicsServer2D_method_body_set_shape>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`RID<class_RID>` shape **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_shape_as_one_way_collision<class_PhysicsServer2D_method_body_set_shape_as_one_way_collision>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` enable, :ref:`float<class_float>` margin **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_shape_disabled<class_PhysicsServer2D_method_body_set_shape_disabled>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`bool<class_bool>` disabled **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_shape_transform<class_PhysicsServer2D_method_body_set_shape_transform>` **(** :ref:`RID<class_RID>` body, :ref:`int<class_int>` shape_idx, :ref:`Transform2D<class_Transform2D>` transform **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_space<class_PhysicsServer2D_method_body_set_space>` **(** :ref:`RID<class_RID>` body, :ref:`RID<class_RID>` space **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`body_set_state<class_PhysicsServer2D_method_body_set_state>` **(** :ref:`RID<class_RID>` body, :ref:`BodyState<enum_PhysicsServer2D_BodyState>` state, :ref:`Variant<class_Variant>` value **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`body_test_motion<class_PhysicsServer2D_method_body_test_motion>` **(** :ref:`RID<class_RID>` body, :ref:`PhysicsTestMotionParameters2D<class_PhysicsTestMotionParameters2D>` parameters, :ref:`PhysicsTestMotionResult2D<class_PhysicsTestMotionResult2D>` result=null **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`capsule_shape_create<class_PhysicsServer2D_method_capsule_shape_create>` **(** **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`circle_shape_create<class_PhysicsServer2D_method_circle_shape_create>` **(** **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`concave_polygon_shape_create<class_PhysicsServer2D_method_concave_polygon_shape_create>` **(** **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`convex_polygon_shape_create<class_PhysicsServer2D_method_convex_polygon_shape_create>` **(** **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`damped_spring_joint_get_param<class_PhysicsServer2D_method_damped_spring_joint_get_param>` **(** :ref:`RID<class_RID>` joint, :ref:`DampedSpringParam<enum_PhysicsServer2D_DampedSpringParam>` param **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`damped_spring_joint_set_param<class_PhysicsServer2D_method_damped_spring_joint_set_param>` **(** :ref:`RID<class_RID>` joint, :ref:`DampedSpringParam<enum_PhysicsServer2D_DampedSpringParam>` param, :ref:`float<class_float>` value **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`free_rid<class_PhysicsServer2D_method_free_rid>` **(** :ref:`RID<class_RID>` rid **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_process_info<class_PhysicsServer2D_method_get_process_info>` **(** :ref:`ProcessInfo<enum_PhysicsServer2D_ProcessInfo>` process_info **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`joint_clear<class_PhysicsServer2D_method_joint_clear>` **(** :ref:`RID<class_RID>` joint **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`joint_create<class_PhysicsServer2D_method_joint_create>` **(** **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`joint_get_param<class_PhysicsServer2D_method_joint_get_param>` **(** :ref:`RID<class_RID>` joint, :ref:`JointParam<enum_PhysicsServer2D_JointParam>` param **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`JointType<enum_PhysicsServer2D_JointType>` | :ref:`joint_get_type<class_PhysicsServer2D_method_joint_get_type>` **(** :ref:`RID<class_RID>` joint **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`joint_make_damped_spring<class_PhysicsServer2D_method_joint_make_damped_spring>` **(** :ref:`RID<class_RID>` joint, :ref:`Vector2<class_Vector2>` anchor_a, :ref:`Vector2<class_Vector2>` anchor_b, :ref:`RID<class_RID>` body_a, :ref:`RID<class_RID>` body_b **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`joint_make_groove<class_PhysicsServer2D_method_joint_make_groove>` **(** :ref:`RID<class_RID>` joint, :ref:`Vector2<class_Vector2>` groove1_a, :ref:`Vector2<class_Vector2>` groove2_a, :ref:`Vector2<class_Vector2>` anchor_b, :ref:`RID<class_RID>` body_a, :ref:`RID<class_RID>` body_b **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`joint_make_pin<class_PhysicsServer2D_method_joint_make_pin>` **(** :ref:`RID<class_RID>` joint, :ref:`Vector2<class_Vector2>` anchor, :ref:`RID<class_RID>` body_a, :ref:`RID<class_RID>` body_b **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`joint_set_param<class_PhysicsServer2D_method_joint_set_param>` **(** :ref:`RID<class_RID>` joint, :ref:`JointParam<enum_PhysicsServer2D_JointParam>` param, :ref:`float<class_float>` value **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`rectangle_shape_create<class_PhysicsServer2D_method_rectangle_shape_create>` **(** **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`segment_shape_create<class_PhysicsServer2D_method_segment_shape_create>` **(** **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`separation_ray_shape_create<class_PhysicsServer2D_method_separation_ray_shape_create>` **(** **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_active<class_PhysicsServer2D_method_set_active>` **(** :ref:`bool<class_bool>` active **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_collision_iterations<class_PhysicsServer2D_method_set_collision_iterations>` **(** :ref:`int<class_int>` iterations **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Variant<class_Variant>` | :ref:`shape_get_data<class_PhysicsServer2D_method_shape_get_data>` **(** :ref:`RID<class_RID>` shape **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`ShapeType<enum_PhysicsServer2D_ShapeType>` | :ref:`shape_get_type<class_PhysicsServer2D_method_shape_get_type>` **(** :ref:`RID<class_RID>` shape **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`shape_set_data<class_PhysicsServer2D_method_shape_set_data>` **(** :ref:`RID<class_RID>` shape, :ref:`Variant<class_Variant>` data **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`space_create<class_PhysicsServer2D_method_space_create>` **(** **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PhysicsDirectSpaceState2D<class_PhysicsDirectSpaceState2D>` | :ref:`space_get_direct_state<class_PhysicsServer2D_method_space_get_direct_state>` **(** :ref:`RID<class_RID>` space **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`space_get_param<class_PhysicsServer2D_method_space_get_param>` **(** :ref:`RID<class_RID>` space, :ref:`SpaceParameter<enum_PhysicsServer2D_SpaceParameter>` param **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`space_is_active<class_PhysicsServer2D_method_space_is_active>` **(** :ref:`RID<class_RID>` space **)** |const| |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`space_set_active<class_PhysicsServer2D_method_space_set_active>` **(** :ref:`RID<class_RID>` space, :ref:`bool<class_bool>` active **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`space_set_param<class_PhysicsServer2D_method_space_set_param>` **(** :ref:`RID<class_RID>` space, :ref:`SpaceParameter<enum_PhysicsServer2D_SpaceParameter>` param, :ref:`float<class_float>` value **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`world_boundary_shape_create<class_PhysicsServer2D_method_world_boundary_shape_create>` **(** **)** |
+-------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Enumerations
------------
@@ -312,6 +308,8 @@ enum **ShapeType**:
.. _enum_PhysicsServer2D_AreaParameter:
.. _class_PhysicsServer2D_constant_AREA_PARAM_GRAVITY_OVERRIDE_MODE:
.. _class_PhysicsServer2D_constant_AREA_PARAM_GRAVITY:
.. _class_PhysicsServer2D_constant_AREA_PARAM_GRAVITY_VECTOR:
@@ -322,29 +320,39 @@ enum **ShapeType**:
.. _class_PhysicsServer2D_constant_AREA_PARAM_GRAVITY_POINT_ATTENUATION:
.. _class_PhysicsServer2D_constant_AREA_PARAM_LINEAR_DAMP_OVERRIDE_MODE:
.. _class_PhysicsServer2D_constant_AREA_PARAM_LINEAR_DAMP:
.. _class_PhysicsServer2D_constant_AREA_PARAM_ANGULAR_DAMP_OVERRIDE_MODE:
.. _class_PhysicsServer2D_constant_AREA_PARAM_ANGULAR_DAMP:
.. _class_PhysicsServer2D_constant_AREA_PARAM_PRIORITY:
enum **AreaParameter**:
- **AREA_PARAM_GRAVITY** = **0** --- Constant to set/get gravity strength in an area.
- **AREA_PARAM_GRAVITY_OVERRIDE_MODE** = **0** --- Constant to set/get gravity override mode in an area. See :ref:`AreaSpaceOverrideMode<enum_PhysicsServer2D_AreaSpaceOverrideMode>` for possible values.
- **AREA_PARAM_GRAVITY_VECTOR** = **1** --- Constant to set/get gravity vector/center in an area.
- **AREA_PARAM_GRAVITY** = **1** --- Constant to set/get gravity strength in an area.
- **AREA_PARAM_GRAVITY_IS_POINT** = **2** --- Constant to set/get whether the gravity vector of an area is a direction, or a center point.
- **AREA_PARAM_GRAVITY_VECTOR** = **2** --- Constant to set/get gravity vector/center in an area.
- **AREA_PARAM_GRAVITY_DISTANCE_SCALE** = **3** --- Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance.
- **AREA_PARAM_GRAVITY_IS_POINT** = **3** --- Constant to set/get whether the gravity vector of an area is a direction, or a center point.
- **AREA_PARAM_GRAVITY_POINT_ATTENUATION** = **4** --- This constant was used to set/get the falloff factor for point gravity. It has been superseded by :ref:`AREA_PARAM_GRAVITY_DISTANCE_SCALE<class_PhysicsServer2D_constant_AREA_PARAM_GRAVITY_DISTANCE_SCALE>`.
- **AREA_PARAM_GRAVITY_DISTANCE_SCALE** = **4** --- Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance.
- **AREA_PARAM_LINEAR_DAMP** = **5** --- Constant to set/get the linear dampening factor of an area.
- **AREA_PARAM_GRAVITY_POINT_ATTENUATION** = **5** --- This constant was used to set/get the falloff factor for point gravity. It has been superseded by :ref:`AREA_PARAM_GRAVITY_DISTANCE_SCALE<class_PhysicsServer2D_constant_AREA_PARAM_GRAVITY_DISTANCE_SCALE>`.
- **AREA_PARAM_ANGULAR_DAMP** = **6** --- Constant to set/get the angular dampening factor of an area.
- **AREA_PARAM_LINEAR_DAMP_OVERRIDE_MODE** = **6** --- Constant to set/get linear damping override mode in an area. See :ref:`AreaSpaceOverrideMode<enum_PhysicsServer2D_AreaSpaceOverrideMode>` for possible values.
- **AREA_PARAM_PRIORITY** = **7** --- Constant to set/get the priority (order of processing) of an area.
- **AREA_PARAM_LINEAR_DAMP** = **7** --- Constant to set/get the linear damping factor of an area.
- **AREA_PARAM_ANGULAR_DAMP_OVERRIDE_MODE** = **8** --- Constant to set/get angular damping override mode in an area. See :ref:`AreaSpaceOverrideMode<enum_PhysicsServer2D_AreaSpaceOverrideMode>` for possible values.
- **AREA_PARAM_ANGULAR_DAMP** = **9** --- Constant to set/get the angular damping factor of an area.
- **AREA_PARAM_PRIORITY** = **10** --- Constant to set/get the priority (order of processing) of an area.
----
@@ -410,6 +418,10 @@ enum **BodyMode**:
.. _class_PhysicsServer2D_constant_BODY_PARAM_GRAVITY_SCALE:
.. _class_PhysicsServer2D_constant_BODY_PARAM_LINEAR_DAMP_MODE:
.. _class_PhysicsServer2D_constant_BODY_PARAM_ANGULAR_DAMP_MODE:
.. _class_PhysicsServer2D_constant_BODY_PARAM_LINEAR_DAMP:
.. _class_PhysicsServer2D_constant_BODY_PARAM_ANGULAR_DAMP:
@@ -426,15 +438,33 @@ enum **BodyParameter**:
- **BODY_PARAM_INERTIA** = **3** --- Constant to set/get a body's inertia.
- **BODY_PARAM_CENTER_OF_MASS** = **4** --- Constant to set/get a body's center of mass.
- **BODY_PARAM_CENTER_OF_MASS** = **4** --- Constant to set/get a body's center of mass position in the body's local coordinate system.
- **BODY_PARAM_GRAVITY_SCALE** = **5** --- Constant to set/get a body's gravity multiplier.
- **BODY_PARAM_LINEAR_DAMP** = **6** --- Constant to set/get a body's linear dampening factor.
- **BODY_PARAM_LINEAR_DAMP_MODE** = **6** --- Constant to set/get a body's linear dampening mode. See :ref:`BodyDampMode<enum_PhysicsServer2D_BodyDampMode>` for possible values.
- **BODY_PARAM_ANGULAR_DAMP** = **7** --- Constant to set/get a body's angular dampening factor.
- **BODY_PARAM_ANGULAR_DAMP_MODE** = **7** --- Constant to set/get a body's angular dampening mode. See :ref:`BodyDampMode<enum_PhysicsServer2D_BodyDampMode>` for possible values.
- **BODY_PARAM_MAX** = **8** --- Represents the size of the :ref:`BodyParameter<enum_PhysicsServer2D_BodyParameter>` enum.
- **BODY_PARAM_LINEAR_DAMP** = **8** --- Constant to set/get a body's linear dampening factor.
- **BODY_PARAM_ANGULAR_DAMP** = **9** --- Constant to set/get a body's angular dampening factor.
- **BODY_PARAM_MAX** = **10** --- Represents the size of the :ref:`BodyParameter<enum_PhysicsServer2D_BodyParameter>` enum.
----
.. _enum_PhysicsServer2D_BodyDampMode:
.. _class_PhysicsServer2D_constant_BODY_DAMP_MODE_COMBINE:
.. _class_PhysicsServer2D_constant_BODY_DAMP_MODE_REPLACE:
enum **BodyDampMode**:
- **BODY_DAMP_MODE_COMBINE** = **0** --- The body's damping value is added to any value set in areas or the default value.
- **BODY_DAMP_MODE_REPLACE** = **1** --- The body's damping value replaces any value set in areas or the default value.
----
@@ -665,14 +695,6 @@ Returns the space assigned to the area.
----
.. _class_PhysicsServer2D_method_area_get_space_override_mode:
- :ref:`AreaSpaceOverrideMode<enum_PhysicsServer2D_AreaSpaceOverrideMode>` **area_get_space_override_mode** **(** :ref:`RID<class_RID>` area **)** |const|
Returns the space override mode for the area.
----
.. _class_PhysicsServer2D_method_area_get_transform:
- :ref:`Transform2D<class_Transform2D>` **area_get_transform** **(** :ref:`RID<class_RID>` area **)** |const|
@@ -691,7 +713,7 @@ Removes a shape from an area. It does not delete the shape, so it can be reassig
.. _class_PhysicsServer2D_method_area_set_area_monitor_callback:
- void **area_set_area_monitor_callback** **(** :ref:`RID<class_RID>` area, :ref:`Object<class_Object>` receiver, :ref:`StringName<class_StringName>` method **)**
- void **area_set_area_monitor_callback** **(** :ref:`RID<class_RID>` area, :ref:`Callable<class_Callable>` callback **)**
----
@@ -713,7 +735,7 @@ Sets which physics layers the area will monitor.
.. _class_PhysicsServer2D_method_area_set_monitor_callback:
- void **area_set_monitor_callback** **(** :ref:`RID<class_RID>` area, :ref:`Object<class_Object>` receiver, :ref:`StringName<class_StringName>` method **)**
- void **area_set_monitor_callback** **(** :ref:`RID<class_RID>` area, :ref:`Callable<class_Callable>` callback **)**
Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters:
@@ -775,14 +797,6 @@ Assigns a space to the area.
----
.. _class_PhysicsServer2D_method_area_set_space_override_mode:
- void **area_set_space_override_mode** **(** :ref:`RID<class_RID>` area, :ref:`AreaSpaceOverrideMode<enum_PhysicsServer2D_AreaSpaceOverrideMode>` mode **)**
Sets the space override mode for the area. See :ref:`AreaSpaceOverrideMode<enum_PhysicsServer2D_AreaSpaceOverrideMode>` for a list of available modes.
----
.. _class_PhysicsServer2D_method_area_set_transform:
- void **area_set_transform** **(** :ref:`RID<class_RID>` area, :ref:`Transform2D<class_Transform2D>` transform **)**
@@ -911,7 +925,7 @@ Returns the continuous collision detection mode.
- :ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>` **body_get_direct_state** **(** :ref:`RID<class_RID>` body **)**
Returns the :ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>` of the body.
Returns the :ref:`PhysicsDirectBodyState2D<class_PhysicsDirectBodyState2D>` of the body. Returns ``null`` if the body is destroyed or removed from the physics space.
----