summaryrefslogtreecommitdiff
path: root/doc/base
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2016-04-29 10:29:12 +0200
committerRémi Verschelde <remi@verschelde.fr>2016-04-29 10:29:12 +0200
commitc97cc362e381137bd8198b7a6a7084b842ac1c59 (patch)
tree03790830903fd3b9c8b69abdc40f3001418b9018 /doc/base
parent4de3f8944e88b3dbfe6c07379c1e360a6e623669 (diff)
parenta7b4127481d1f377a50ac5f62ec3f20e2ba71dff (diff)
Merge pull request #4387 from JoshuaGrams/rigidbody2d-torque
Hooked up RigidBody2D torque methods
Diffstat (limited to 'doc/base')
-rw-r--r--doc/base/classes.xml62
1 files changed, 56 insertions, 6 deletions
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index a71b897e8c..9f6daafdd4 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -24661,6 +24661,17 @@ This method controls whether the position between two cached points is interpola
<description>
</description>
</method>
+ <method name="body_add_force">
+ <argument index="0" name="body" type="RID">
+ </argument>
+ <argument index="1" name="offset" type="Vector2">
+ </argument>
+ <argument index="2" name="force" type="Vector2">
+ </argument>
+ <description>
+ Add a positioned force to the applied force and torque. As with [method body_apply_impulse], both the force and the offset from the body origin are in global coordinates.
+ </description>
+ </method>
<method name="body_set_axis_velocity">
<argument index="0" name="body" type="RID">
</argument>
@@ -24948,13 +24959,15 @@ This method controls whether the position between two cached points is interpola
</constant>
<constant name="BODY_PARAM_MASS" value="2">
</constant>
- <constant name="BODY_PARAM_GRAVITY_SCALE" value="3">
+ <constant name="BODY_PARAM_INERTIA" value="3">
</constant>
- <constant name="BODY_PARAM_LINEAR_DAMP" value="4">
+ <constant name="BODY_PARAM_GRAVITY_SCALE" value="4">
</constant>
- <constant name="BODY_PARAM_ANGULAR_DAMP" value="5">
+ <constant name="BODY_PARAM_LINEAR_DAMP" value="5">
</constant>
- <constant name="BODY_PARAM_MAX" value="6">
+ <constant name="BODY_PARAM_ANGULAR_DAMP" value="6">
+ </constant>
+ <constant name="BODY_PARAM_MAX" value="7">
</constant>
<constant name="BODY_STATE_TRANSFORM" value="0">
</constant>
@@ -30147,6 +30160,20 @@ This method controls whether the position between two cached points is interpola
Return the body mass.
</description>
</method>
+ <method name="get_inertia" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the body's moment of inertia. This is usually automatically computed from the mass and the shapes. Note that this doesn't seem to work in a [code]_ready[/code] function: it apparently has not been auto-computed yet.
+ </description>
+ </method>
+ <method name="set_inertia">
+ <argument index="0" name="inertia" type="float">
+ </argument>
+ <description>
+ Set 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 function allows you to set a custom value. Set 0 (or negative) inertia to return to automatically computing it.
+ </description>
+ </method>
<method name="set_weight">
<argument index="0" name="weight" type="float">
</argument>
@@ -30324,12 +30351,12 @@ This method controls whether the position between two cached points is interpola
</description>
</method>
<method name="apply_impulse">
- <argument index="0" name="pos" type="Vector2">
+ <argument index="0" name="offset" type="Vector2">
</argument>
<argument index="1" name="impulse" type="Vector2">
</argument>
<description>
- Apply a positioned impulse (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once.
+ Apply a positioned impulse (which will be affected by the body mass and shape). This is the equivalent of hitting a billiard ball with a cue: a force that is applied once, and only once. Both the impulse and the offset from the body origin are in global coordinates.
</description>
</method>
<method name="set_applied_force">
@@ -30346,6 +30373,29 @@ This method controls whether the position between two cached points is interpola
Return the applied force vector.
</description>
</method>
+ <method name="set_applied_torque">
+ <argument index="0" name="torque" type="float">
+ </argument>
+ <description>
+ Set a constant torque which will be applied to this body.
+ </description>
+ </method>
+ <method name="get_applied_torque" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ Return the torque which is being applied to this body.
+ </description>
+ </method>
+ <method name="add_force">
+ <argument index="0" name="offset" type="Vector2">
+ </argument>
+ <argument index="1" name="force" type="Vector2">
+ </argument>
+ <description>
+ Add a positioned force to the applied force and torque. As with [method apply_impulse], both the force and the offset from the body origin are in global coordinates.
+ </description>
+ </method>
<method name="set_sleeping">
<argument index="0" name="sleeping" type="bool">
</argument>