|
@@ -2,8 +2,8 @@
|
|
|
|
|
|
.. DO NOT EDIT THIS FILE!!!
|
|
|
.. Generated automatically from Godot engine sources.
|
|
|
-.. Generator: https://github.com/godotengine/godot/tree/3.5/doc/tools/make_rst.py.
|
|
|
-.. XML source: https://github.com/godotengine/godot/tree/3.5/doc/classes/Area.xml.
|
|
|
+.. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
|
|
|
+.. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/Area.xml.
|
|
|
|
|
|
.. _class_Area:
|
|
|
|
|
@@ -25,6 +25,8 @@ To give the area its shape, add a :ref:`CollisionShape<class_CollisionShape>` or
|
|
|
|
|
|
\ **Warning:** See :ref:`ConcavePolygonShape<class_ConcavePolygonShape>` (also called "trimesh") for a warning about possibly unexpected behavior when using that shape for an area.
|
|
|
|
|
|
+\ **Warning:** With a non-uniform scale this node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change the size(s) of its collision shape(s) instead.
|
|
|
+
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
|
|
Tutorials
|
|
@@ -143,9 +145,19 @@ Emitted when one of another Area's :ref:`Shape<class_Shape>`\ s enters one of th
|
|
|
|
|
|
\ ``area`` the other Area.
|
|
|
|
|
|
-\ ``area_shape_index`` the index of the :ref:`Shape<class_Shape>` of the other Area used by the :ref:`PhysicsServer<class_PhysicsServer>`. Get the :ref:`CollisionShape<class_CollisionShape>` node with ``area.shape_owner_get_owner(area_shape_index)``.
|
|
|
+\ ``area_shape_index`` the index of the :ref:`Shape<class_Shape>` from the other Area.
|
|
|
+
|
|
|
+\ ``local_shape_index`` the index of the :ref:`Shape<class_Shape>` from this Area.
|
|
|
+
|
|
|
+\ **Example of getting the** :ref:`CollisionShape<class_CollisionShape>` **node from the shape index:**\
|
|
|
|
|
|
-\ ``local_shape_index`` the index of the :ref:`Shape<class_Shape>` of this Area used by the :ref:`PhysicsServer<class_PhysicsServer>`. Get the :ref:`CollisionShape<class_CollisionShape>` node with ``self.shape_owner_get_owner(local_shape_index)``.
|
|
|
+::
|
|
|
+
|
|
|
+ var other_shape_owner = area.shape_find_owner(area_shape_index)
|
|
|
+ var other_shape_node = area.shape_owner_get_owner(other_shape_owner)
|
|
|
+
|
|
|
+ var local_shape_owner = shape_find_owner(local_shape_index)
|
|
|
+ var local_shape_node = shape_owner_get_owner(local_shape_owner)
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
@@ -163,9 +175,11 @@ Emitted when one of another Area's :ref:`Shape<class_Shape>`\ s enters one of th
|
|
|
|
|
|
\ ``area`` the other Area.
|
|
|
|
|
|
-\ ``area_shape_index`` the index of the :ref:`Shape<class_Shape>` of the other Area used by the :ref:`PhysicsServer<class_PhysicsServer>`. Get the :ref:`CollisionShape<class_CollisionShape>` node with ``area.shape_owner_get_owner(area_shape_index)``.
|
|
|
+\ ``area_shape_index`` the index of the :ref:`Shape<class_Shape>` from the other Area.
|
|
|
+
|
|
|
+\ ``local_shape_index`` the index of the :ref:`Shape<class_Shape>` from this Area.
|
|
|
|
|
|
-\ ``local_shape_index`` the index of the :ref:`Shape<class_Shape>` of this Area used by the :ref:`PhysicsServer<class_PhysicsServer>`. Get the :ref:`CollisionShape<class_CollisionShape>` node with ``self.shape_owner_get_owner(local_shape_index)``.
|
|
|
+See also :ref:`area_shape_entered<class_Area_signal_area_shape_entered>`.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
@@ -211,9 +225,19 @@ Emitted when one of a :ref:`PhysicsBody<class_PhysicsBody>` or :ref:`GridMap<cla
|
|
|
|
|
|
\ ``body`` the :ref:`Node<class_Node>`, if it exists in the tree, of the :ref:`PhysicsBody<class_PhysicsBody>` or :ref:`GridMap<class_GridMap>`.
|
|
|
|
|
|
-\ ``body_shape_index`` the index of the :ref:`Shape<class_Shape>` of the :ref:`PhysicsBody<class_PhysicsBody>` or :ref:`GridMap<class_GridMap>` used by the :ref:`PhysicsServer<class_PhysicsServer>`. Get the :ref:`CollisionShape<class_CollisionShape>` node with ``body.shape_owner_get_owner(body_shape_index)``.
|
|
|
+\ ``body_shape_index`` the index of the :ref:`Shape<class_Shape>` from the :ref:`PhysicsBody<class_PhysicsBody>` or :ref:`GridMap<class_GridMap>`.
|
|
|
|
|
|
-\ ``local_shape_index`` the index of the :ref:`Shape<class_Shape>` of this Area used by the :ref:`PhysicsServer<class_PhysicsServer>`. Get the :ref:`CollisionShape<class_CollisionShape>` node with ``self.shape_owner_get_owner(local_shape_index)``.
|
|
|
+\ ``local_shape_index`` the index of the :ref:`Shape<class_Shape>` from this Area.
|
|
|
+
|
|
|
+\ **Example of getting the** :ref:`CollisionShape<class_CollisionShape>` **node from the shape index:**\
|
|
|
+
|
|
|
+::
|
|
|
+
|
|
|
+ var body_shape_owner = body.shape_find_owner(body_shape_index)
|
|
|
+ var body_shape_node = body.shape_owner_get_owner(body_shape_owner)
|
|
|
+
|
|
|
+ var local_shape_owner = shape_find_owner(local_shape_index)
|
|
|
+ var local_shape_node = shape_owner_get_owner(local_shape_owner)
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
@@ -231,9 +255,11 @@ Emitted when one of a :ref:`PhysicsBody<class_PhysicsBody>` or :ref:`GridMap<cla
|
|
|
|
|
|
\ ``body`` the :ref:`Node<class_Node>`, if it exists in the tree, of the :ref:`PhysicsBody<class_PhysicsBody>` or :ref:`GridMap<class_GridMap>`.
|
|
|
|
|
|
-\ ``body_shape_index`` the index of the :ref:`Shape<class_Shape>` of the :ref:`PhysicsBody<class_PhysicsBody>` or :ref:`GridMap<class_GridMap>` used by the :ref:`PhysicsServer<class_PhysicsServer>`. Get the :ref:`CollisionShape<class_CollisionShape>` node with ``body.shape_owner_get_owner(body_shape_index)``.
|
|
|
+\ ``body_shape_index`` the index of the :ref:`Shape<class_Shape>` from the :ref:`PhysicsBody<class_PhysicsBody>` or :ref:`GridMap<class_GridMap>`.
|
|
|
+
|
|
|
+\ ``local_shape_index`` the index of the :ref:`Shape<class_Shape>` from this Area.
|
|
|
|
|
|
-\ ``local_shape_index`` the index of the :ref:`Shape<class_Shape>` of this Area used by the :ref:`PhysicsServer<class_PhysicsServer>`. Get the :ref:`CollisionShape<class_CollisionShape>` node with ``self.shape_owner_get_owner(local_shape_index)``.
|
|
|
+See also :ref:`body_shape_entered<class_Area_signal_body_shape_entered>`.
|
|
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|