mirror of
https://github.com/godotengine/godot.git
synced 2024-11-24 21:22:48 +00:00
Updated tutorial_physics_2d (markdown)
parent
6f8aa4199d
commit
8435053cee
@ -152,6 +152,12 @@ func _integrate_forcres(state):
|
||||
|
||||
The `state` parameter is of type [Physics2DDirectBodyState](class_physics2ddirectbodystate). Please do not use this object (state) outside the callback as it will result in an error.
|
||||
|
||||
##### Contact Reporting
|
||||
|
||||
In general, RigidBody2D will not keep track of the contacts, because this can require a huge amount of memory if thousands of rigid bodies are in the scene. To get contacts reported, simply increase the amount of the "contacts reported" property from zero to a meaningful value (depending on how many you are expecting to get). The contacts can be later obtained via the [Physics2DDirectBodyState.get_contact_count](class_physics2ddirectbodystate#get_contact_count)() and related functions.
|
||||
|
||||
Contact monitoring via signals is also available (signals similar to the ones in Area2D, described below) via a boolean property.
|
||||
|
||||
### Area2D
|
||||
|
||||
Areas in Godot physics have two main roles:
|
||||
|
Loading…
Reference in New Issue
Block a user