summaryrefslogtreecommitdiff
path: root/doc/classes/PhysicsServer2D.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/PhysicsServer2D.xml')
-rw-r--r--doc/classes/PhysicsServer2D.xml30
1 files changed, 20 insertions, 10 deletions
diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml
index 9867b98ae6..7e5d7ca704 100644
--- a/doc/classes/PhysicsServer2D.xml
+++ b/doc/classes/PhysicsServer2D.xml
@@ -373,7 +373,7 @@
</description>
</method>
<method name="body_get_param" qualifiers="const">
- <return type="float" />
+ <return type="Variant" />
<argument index="0" name="body" type="RID" />
<argument index="1" name="param" type="int" enum="PhysicsServer2D.BodyParameter" />
<description>
@@ -449,6 +449,13 @@
Removes a shape from a body. The shape is not deleted, so it can be reused afterwards.
</description>
</method>
+ <method name="body_reset_mass_properties">
+ <return type="void" />
+ <argument index="0" name="body" type="RID" />
+ <description>
+ Restores the default inertia and center of mass based on shapes to cancel any custom values previously set using [method body_set_param].
+ </description>
+ </method>
<method name="body_set_axis_velocity">
<return type="void" />
<argument index="0" name="body" type="RID" />
@@ -522,7 +529,7 @@
<return type="void" />
<argument index="0" name="body" type="RID" />
<argument index="1" name="param" type="int" enum="PhysicsServer2D.BodyParameter" />
- <argument index="2" name="value" type="float" />
+ <argument index="2" name="value" type="Variant" />
<description>
Sets a body parameter. See [enum BodyParameter] for a list of available parameters.
</description>
@@ -816,7 +823,7 @@
Sets the value for a space parameter. See [enum SpaceParameter] for a list of available parameters.
</description>
</method>
- <method name="world_margin_shape_create">
+ <method name="world_boundary_shape_create">
<return type="RID" />
<description>
</description>
@@ -846,8 +853,8 @@
</constant>
<constant name="SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH" value="7" enum="SpaceParameter">
</constant>
- <constant name="SHAPE_WORLD_MARGIN" value="0" enum="ShapeType">
- This is the constant for creating world margin shapes. A world margin shape is an [i]infinite[/i] line with an origin point, and a normal. Thus, it can be used for front/behind checks.
+ <constant name="SHAPE_WORLD_BOUNDARY" value="0" enum="ShapeType">
+ This is the constant for creating world boundary shapes. A world boundary shape is an [i]infinite[/i] line with an origin point, and a normal. Thus, it can be used for front/behind checks.
</constant>
<constant name="SHAPE_SEPARATION_RAY" value="1" enum="ShapeType">
This is the constant for creating separation ray shapes. A separation ray is defined by a length and separates itself from what is touching its far endpoint. Useful for character controllers.
@@ -913,7 +920,7 @@
This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
</constant>
<constant name="BODY_MODE_STATIC" value="0" enum="BodyMode">
- Constant for static bodies. In this mode, a body can be only moved by user code.
+ Constant for static bodies. In this mode, a body can be only moved by user code and doesn't collide with other bodies along its path when moved.
</constant>
<constant name="BODY_MODE_KINEMATIC" value="1" enum="BodyMode">
Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path.
@@ -936,16 +943,19 @@
<constant name="BODY_PARAM_INERTIA" value="3" enum="BodyParameter">
Constant to set/get a body's inertia.
</constant>
- <constant name="BODY_PARAM_GRAVITY_SCALE" value="4" enum="BodyParameter">
+ <constant name="BODY_PARAM_CENTER_OF_MASS" value="4" enum="BodyParameter">
+ Constant to set/get a body's center of mass.
+ </constant>
+ <constant name="BODY_PARAM_GRAVITY_SCALE" value="5" enum="BodyParameter">
Constant to set/get a body's gravity multiplier.
</constant>
- <constant name="BODY_PARAM_LINEAR_DAMP" value="5" enum="BodyParameter">
+ <constant name="BODY_PARAM_LINEAR_DAMP" value="6" enum="BodyParameter">
Constant to set/get a body's linear dampening factor.
</constant>
- <constant name="BODY_PARAM_ANGULAR_DAMP" value="6" enum="BodyParameter">
+ <constant name="BODY_PARAM_ANGULAR_DAMP" value="7" enum="BodyParameter">
Constant to set/get a body's angular dampening factor.
</constant>
- <constant name="BODY_PARAM_MAX" value="7" enum="BodyParameter">
+ <constant name="BODY_PARAM_MAX" value="8" enum="BodyParameter">
Represents the size of the [enum BodyParameter] enum.
</constant>
<constant name="BODY_STATE_TRANSFORM" value="0" enum="BodyState">