mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
update images and related information
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 7.7 KiB |
BIN
tutorials/physics/img/area2d_coin_nodes.webp
Normal file
BIN
tutorials/physics/img/area2d_coin_nodes.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 63 KiB |
BIN
tutorials/physics/img/area2d_properties.webp
Normal file
BIN
tutorials/physics/img/area2d_properties.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
@@ -28,21 +28,21 @@ Area properties
|
||||
|
||||
Areas have many properties you can use to customize their behavior.
|
||||
|
||||
.. image:: img/area2d_properties.png
|
||||
.. image:: img/area2d_properties.webp
|
||||
|
||||
The first eight properties are used to configure the area's physics override
|
||||
behavior. We'll look at how to use those in the section below.
|
||||
The ``Gravity``, ``Linear Damp``, and ``Angular Damp`` sections
|
||||
are used to configure the area's physics override behavior.
|
||||
We'll look at how to use those in the *Area influence* section below.
|
||||
|
||||
*Monitoring* and *Monitorable* are used to enable and disable the area.
|
||||
``Monitoring`` and ``Monitorable`` are used to enable and disable the area.
|
||||
|
||||
The "Collision" section is where you configure the area's collision layer(s)
|
||||
and mask(s).
|
||||
|
||||
The "Audio Bus" section allows you to override audio in the area, for example to
|
||||
The ``Audio Bus`` section allows you to override audio in the area, for example to
|
||||
apply an audio effect when the player moves through.
|
||||
|
||||
Note that Area2D extends :ref:`CollisionObject2D <class_CollisionObject2D>`, so it
|
||||
also provides properties inherited from that class, such as ``input_pickable``.
|
||||
also provides properties inherited from that class.
|
||||
The ``Collision`` section of ``CollisionObject2D`` is where you configure the
|
||||
area's collision layer(s) and mask(s).
|
||||
|
||||
Overlap detection
|
||||
-----------------
|
||||
@@ -57,7 +57,7 @@ to disappear when the player touches it.
|
||||
|
||||
Here's the node setup for the coin:
|
||||
|
||||
.. image:: img/area2d_coin_nodes.png
|
||||
.. image:: img/area2d_coin_nodes.webp
|
||||
|
||||
To detect the overlap, we'll connect the appropriate signal on the Area2D. Which
|
||||
signal to use depends on the player's node type. If the player is another area,
|
||||
@@ -102,8 +102,8 @@ Area influence
|
||||
--------------
|
||||
|
||||
The second major use for area nodes is to alter physics. By default, the area
|
||||
won't do this, but you can enable this with the *Space Override* property. When
|
||||
areas overlap, they are processed in *Priority* order (higher priority areas are
|
||||
won't do this, but you can enable this with the ``Space Override`` property. When
|
||||
areas overlap, they are processed in ``Priority`` order (higher priority areas are
|
||||
processed first). There are four options for override:
|
||||
|
||||
- *Combine* - The area adds its values to what has been calculated so far.
|
||||
@@ -117,15 +117,15 @@ overlapping areas.
|
||||
The physics properties that can be overridden are:
|
||||
|
||||
- *Gravity* - Gravity's strength inside the area.
|
||||
- *Gravity Vec* - Gravity's direction. This vector does not need to be normalized.
|
||||
- *Gravity Direction* - This vector does not need to be normalized.
|
||||
- *Linear Damp* - How quickly objects stop moving - linear velocity lost per second.
|
||||
- *Angular Damp* - How quickly objects stop spinning - angular velocity lost per second.
|
||||
|
||||
Point gravity
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
The *Gravity Point* property allows you to create an "attractor". Gravity in the
|
||||
area will be calculated towards a point, given by the *Gravity Vec* property.
|
||||
The ``Gravity Point`` property allows you to create an "attractor". Gravity in the
|
||||
area will be calculated towards a point, given by the ``Point Center`` property.
|
||||
Values are relative to the Area2D, so for example using ``(0, 0)`` will attract
|
||||
objects to the center of the area.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user