mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 19:42:43 +00:00
Updated tutorial_physics_2d (markdown)
parent
2bcee8a03d
commit
327462de4d
@ -155,6 +155,19 @@ Areas in Godot physics have two main roles:
|
||||
1. Override the space parameters for objects entering them (ie. gravity, gravity direction, gravity type, density, etc).
|
||||
2. Monitor when rigid or kinematic bodies enter or exit the area.
|
||||
|
||||
The second function is the most common. For it to work, the "monitoring" property must be enabled (it is by default). There are two types of signals emitted by this node:
|
||||
|
||||
```python
|
||||
#Simple, high level notification
|
||||
body_enter(body:PhysicsBody2D)
|
||||
body_exit(body:PhysicsBody2D)
|
||||
|
||||
#Low level shape-based notification
|
||||
#notifies which shape specifically in both the body and area are in contact
|
||||
body_enter_shape(body_id:int,body:PhysicsBody2D,body_shape_index:int,area_shape_index:idx)
|
||||
body_exit_shape(body_id:int,body:PhysicsBody2D,body_shape_index:int,area_shape_index:idx)
|
||||
```
|
||||
|
||||
### Physics Global Variables
|
||||
|
||||
### FPS & Fixed Process Callback
|
Loading…
Reference in New Issue
Block a user