Update Rigidbody 2D and 3D sleep documentation.
(cherry picked from commit 1b738a77c1
)
This commit is contained in:
parent
51de6732c9
commit
7200a0eac5
|
@ -151,7 +151,7 @@
|
||||||
Deprecated, use [member PhysicsMaterial.bounce] instead via [member physics_material_override].
|
Deprecated, use [member PhysicsMaterial.bounce] instead via [member physics_material_override].
|
||||||
</member>
|
</member>
|
||||||
<member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true">
|
<member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true">
|
||||||
If [code]true[/code], the RigidBody will not calculate forces and will act as a static body while there is no movement. It will wake up when forces are applied through other collisions or when the [code]apply_impulse[/code] method is used.
|
If [code]true[/code], the body can enter sleep mode when there is no movement. See [member sleeping].
|
||||||
</member>
|
</member>
|
||||||
<member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false">
|
<member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false">
|
||||||
If [code]true[/code], the RigidBody will emit signals when it collides with another RigidBody.
|
If [code]true[/code], the RigidBody will emit signals when it collides with another RigidBody.
|
||||||
|
@ -190,7 +190,7 @@
|
||||||
If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one.
|
If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one.
|
||||||
</member>
|
</member>
|
||||||
<member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping" default="false">
|
<member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping" default="false">
|
||||||
If [code]true[/code], the body is sleeping and will not calculate forces until woken up by a collision or the [code]apply_impulse[/code] method.
|
If [code]true[/code], the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the [method apply_impulse] or [method add_force] methods.
|
||||||
</member>
|
</member>
|
||||||
<member name="weight" type="float" setter="set_weight" getter="get_weight" default="9.8">
|
<member name="weight" type="float" setter="set_weight" getter="get_weight" default="9.8">
|
||||||
The body's weight based on its mass and the global 3D gravity. Global values are set in [b]Project > Project Settings > Physics > 3d[/b].
|
The body's weight based on its mass and the global 3D gravity. Global values are set in [b]Project > Project Settings > Physics > 3d[/b].
|
||||||
|
@ -241,7 +241,8 @@
|
||||||
</signal>
|
</signal>
|
||||||
<signal name="sleeping_state_changed">
|
<signal name="sleeping_state_changed">
|
||||||
<description>
|
<description>
|
||||||
Emitted when the body changes its sleeping state. Either by sleeping or waking up.
|
Emitted when the physics engine changes the body's sleeping state.
|
||||||
|
[b]Note:[/b] Changing the value [member sleeping] will not trigger this signal. It is only emitted if the sleeping state is changed by the physics engine or [code]emit_signal("sleeping_state_changed")[/code] is used.
|
||||||
</description>
|
</description>
|
||||||
</signal>
|
</signal>
|
||||||
</signals>
|
</signals>
|
||||||
|
|
|
@ -131,7 +131,7 @@
|
||||||
Deprecated, use [member PhysicsMaterial.bounce] instead via [member physics_material_override].
|
Deprecated, use [member PhysicsMaterial.bounce] instead via [member physics_material_override].
|
||||||
</member>
|
</member>
|
||||||
<member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true">
|
<member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true">
|
||||||
If [code]true[/code], the body will not calculate forces and will act as a static body if there is no movement. The body will wake up when other forces are applied via collisions or by using [method apply_impulse] or [method add_force].
|
If [code]true[/code], the body can enter sleep mode when there is no movement. See [member sleeping].
|
||||||
</member>
|
</member>
|
||||||
<member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false">
|
<member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false">
|
||||||
If [code]true[/code], the body will emit signals when it collides with another RigidBody2D. See also [member contacts_reported].
|
If [code]true[/code], the body will emit signals when it collides with another RigidBody2D. See also [member contacts_reported].
|
||||||
|
@ -173,7 +173,7 @@
|
||||||
If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one.
|
If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one.
|
||||||
</member>
|
</member>
|
||||||
<member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping" default="false">
|
<member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping" default="false">
|
||||||
If [code]true[/code], the body is sleeping and will not calculate forces until woken up by a collision or by using [method apply_impulse] or [method add_force].
|
If [code]true[/code], the body will not move and will not calculate forces until woken up by another body through, for example, a collision, or by using the [method apply_impulse] or [method add_force] methods.
|
||||||
</member>
|
</member>
|
||||||
<member name="weight" type="float" setter="set_weight" getter="get_weight" default="9.8">
|
<member name="weight" type="float" setter="set_weight" getter="get_weight" default="9.8">
|
||||||
The body's weight based on its mass and the [b]Default Gravity[/b] value in [b]Project > Project Settings > Physics > 2d[/b].
|
The body's weight based on its mass and the [b]Default Gravity[/b] value in [b]Project > Project Settings > Physics > 2d[/b].
|
||||||
|
@ -222,7 +222,8 @@
|
||||||
</signal>
|
</signal>
|
||||||
<signal name="sleeping_state_changed">
|
<signal name="sleeping_state_changed">
|
||||||
<description>
|
<description>
|
||||||
Emitted when [member sleeping] changes.
|
Emitted when the physics engine changes the body's sleeping state.
|
||||||
|
[b]Note:[/b] Changing the value [member sleeping] will not trigger this signal. It is only emitted if the sleeping state is changed by the physics engine or [code]emit_signal("sleeping_state_changed")[/code] is used.
|
||||||
</description>
|
</description>
|
||||||
</signal>
|
</signal>
|
||||||
</signals>
|
</signals>
|
||||||
|
|
Loading…
Reference in New Issue