summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJosh Grams <josh@qualdan.com>2016-04-20 20:49:37 -0400
committerJosh Grams <josh@qualdan.com>2016-04-20 20:49:37 -0400
commitf7d31cec38c795909c4d1e0917f54aa118d380d7 (patch)
tree842bb5cd786dbce408bb7f5c563a9502542c05eb /doc
parentdbabe4c07cd9c0d825c14b961bd472f77e525162 (diff)
RigidBody2D: add and bind get_inertia() method.
You can't set this value very well, since it's automatically computed from the mass and the collision shapes. But since the values are higher than many people might suspect, so being able to read it helps estimate the amount of torque you might need to apply.
Diffstat (limited to 'doc')
-rw-r--r--doc/base/classes.xml19
1 files changed, 15 insertions, 4 deletions
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index 9b951be0d2..6aebbabea9 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -24867,13 +24867,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>
@@ -30035,6 +30037,13 @@ 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 automatically computed from the mass and the shapes, so you can't set it. But at least you can find out what it's current value is...
+ </description>
+ </method>
<method name="set_weight">
<argument index="0" name="weight" type="float">
</argument>
@@ -30238,12 +30247,14 @@ This method controls whether the position between two cached points is interpola
<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="set_sleeping">