diff options
Diffstat (limited to 'doc/classes/RigidDynamicBody2D.xml')
-rw-r--r-- | doc/classes/RigidDynamicBody2D.xml | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/doc/classes/RigidDynamicBody2D.xml b/doc/classes/RigidDynamicBody2D.xml index f503884192..b8680b99b3 100644 --- a/doc/classes/RigidDynamicBody2D.xml +++ b/doc/classes/RigidDynamicBody2D.xml @@ -82,10 +82,13 @@ </method> </methods> <members> - <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="-1.0"> - Damps the body's [member angular_velocity]. If [code]-1[/code], the body will use the [b]Default Angular Damp[/b] defined in [b]Project > Project Settings > Physics > 2d[/b]. + <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="0.0"> + Damps the body's rotation. By default, the body will use the [b]Default Angular Damp[/b] in [b]Project > Project Settings > Physics > 2d[/b] or any value override set by an [Area2D] the body is in. Depending on [member angular_damp_mode], you can set [member angular_damp] to be added to or to replace the body's damping value. See [member ProjectSettings.physics/2d/default_angular_damp] for more details about damping. </member> + <member name="angular_damp_mode" type="int" setter="set_angular_damp_mode" getter="get_angular_damp_mode" enum="RigidDynamicBody2D.DampMode" default="0"> + Defines how [member angular_damp] is applied. See [enum DampMode] for possible values. + </member> <member name="angular_velocity" type="float" setter="set_angular_velocity" getter="get_angular_velocity" default="0.0"> The body's rotational velocity. </member> @@ -135,10 +138,13 @@ The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value. If set to [code]0[/code], inertia is automatically computed (default value). </member> - <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="-1.0"> - Damps the body's [member linear_velocity]. If [code]-1[/code], the body will use the [b]Default Linear Damp[/b] in [b]Project > Project Settings > Physics > 2d[/b]. + <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="0.0"> + Damps the body's movement. By default, the body will use the [b]Default Linear Damp[/b] in [b]Project > Project Settings > Physics > 2d[/b] or any value override set by an [Area2D] the body is in. Depending on [member linear_damp_mode], you can set [member linear_damp] to be added to or to replace the body's damping value. See [member ProjectSettings.physics/2d/default_linear_damp] for more details about damping. </member> + <member name="linear_damp_mode" type="int" setter="set_linear_damp_mode" getter="get_linear_damp_mode" enum="RigidDynamicBody2D.DampMode" default="0"> + Defines how [member linear_damp] is applied. See [enum DampMode] for possible values. + </member> <member name="linear_velocity" type="Vector2" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector2(0, 0)"> The body's linear velocity. </member> @@ -217,6 +223,12 @@ <constant name="CENTER_OF_MASS_MODE_CUSTOM" value="1" enum="CenterOfMassMode"> In this mode, the body's center of mass is set through [member center_of_mass]. Defaults to the body's origin position. </constant> + <constant name="DAMP_MODE_COMBINE" value="0" enum="DampMode"> + In this mode, the body's damping value is added to any value set in areas or the default value. + </constant> + <constant name="DAMP_MODE_REPLACE" value="1" enum="DampMode"> + In this mode, the body's damping value replaces any value set in areas or the default value. + </constant> <constant name="CCD_MODE_DISABLED" value="0" enum="CCDMode"> Continuous collision detection disabled. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. </constant> |