doc: Mark PhysicsBody bounce/friction as deprecated

This commit is contained in:
Rémi Verschelde 2019-06-30 13:07:32 +02:00
parent 850a54a2a5
commit 1fbca7ed88
5 changed files with 12 additions and 4 deletions

View file

@ -14,7 +14,7 @@
<member name="absorbent" type="bool" setter="set_absorbent" getter="is_absorbent" default="false">
</member>
<member name="bounce" type="float" setter="set_bounce" getter="get_bounce" default="0.0">
The body's bounciness.
The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness).
</member>
<member name="friction" type="float" setter="set_friction" getter="get_friction" default="1.0">
The body's friction. Values range from [code]0[/code] (frictionless) to [code]1[/code] (maximum friction).

View file

@ -126,7 +126,8 @@
Lock the body's movement in the Z axis.
</member>
<member name="bounce" type="float" setter="set_bounce" getter="get_bounce">
RigidBody's bounciness.
The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness).
Deprecated, use [member PhysicsMaterial.bounce] instead via [member physics_material_override].
</member>
<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.
@ -146,6 +147,7 @@
</member>
<member name="friction" type="float" setter="set_friction" getter="get_friction">
The body's friction, from 0 (frictionless) to 1 (max friction).
Deprecated, use [member PhysicsMaterial.friction] instead via [member physics_material_override].
</member>
<member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" default="1.0">
This is multiplied by the global 3D gravity setting found in [b]Project &gt; Project Settings &gt; Physics &gt; 3d[/b] to produce RigidBody's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object.

View file

@ -127,7 +127,8 @@
The body's total applied torque.
</member>
<member name="bounce" type="float" setter="set_bounce" getter="get_bounce">
The body's bounciness.
The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness).
Deprecated, use [member PhysicsMaterial.bounce] instead via [member physics_material_override].
</member>
<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].
@ -147,6 +148,7 @@
</member>
<member name="friction" type="float" setter="set_friction" getter="get_friction">
The body's friction. Values range from [code]0[/code] (frictionless) to [code]1[/code] (maximum friction).
Deprecated, use [member PhysicsMaterial.friction] instead via [member physics_material_override].
</member>
<member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" default="1.0">
Multiplies the gravity applied to the body. The body's gravity is calculated from the [b]Default Gravity[/b] value in [b]Project &gt; Project Settings &gt; Physics &gt; 2d[/b] and/or any additional gravity vector applied by [Area2D]s.

View file

@ -14,7 +14,8 @@
</methods>
<members>
<member name="bounce" type="float" setter="set_bounce" getter="get_bounce">
The body's bounciness.
The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness).
Deprecated, use [member PhysicsMaterial.bounce] instead via [member physics_material_override].
</member>
<member name="constant_angular_velocity" type="Vector3" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="Vector3( 0, 0, 0 )">
The body's constant angular velocity. This does not rotate the body, but affects other bodies that touch it, as if it was in a state of rotation.
@ -24,6 +25,7 @@
</member>
<member name="friction" type="float" setter="set_friction" getter="get_friction">
The body's friction, from 0 (frictionless) to 1 (full friction).
Deprecated, use [member PhysicsMaterial.friction] instead via [member physics_material_override].
</member>
<member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override" default="null">
</member>

View file

@ -14,6 +14,7 @@
<members>
<member name="bounce" type="float" setter="set_bounce" getter="get_bounce">
The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness).
Deprecated, use [member PhysicsMaterial.bounce] instead via [member physics_material_override].
</member>
<member name="constant_angular_velocity" type="float" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="0.0">
The body's constant angular velocity. This does not rotate the body, but affects colliding bodies, as if it were rotating.
@ -23,6 +24,7 @@
</member>
<member name="friction" type="float" setter="set_friction" getter="get_friction">
The body's friction. Values range from [code]0[/code] (no friction) to [code]1[/code] (full friction).
Deprecated, use [member PhysicsMaterial.friction] instead via [member physics_material_override].
</member>
<member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override" default="null">
</member>