diff options
author | Josh Grams <josh@qualdan.com> | 2016-04-20 20:49:37 -0400 |
---|---|---|
committer | Josh Grams <josh@qualdan.com> | 2016-04-20 20:49:37 -0400 |
commit | f7d31cec38c795909c4d1e0917f54aa118d380d7 (patch) | |
tree | 842bb5cd786dbce408bb7f5c563a9502542c05eb /scene/2d/physics_body_2d.h | |
parent | dbabe4c07cd9c0d825c14b961bd472f77e525162 (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 'scene/2d/physics_body_2d.h')
-rw-r--r-- | scene/2d/physics_body_2d.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/2d/physics_body_2d.h b/scene/2d/physics_body_2d.h index 40cb25d8c1..7523413df3 100644 --- a/scene/2d/physics_body_2d.h +++ b/scene/2d/physics_body_2d.h @@ -217,6 +217,8 @@ public: void set_mass(real_t p_mass); real_t get_mass() const; + real_t get_inertia() const; // read-only: auto-computed from mass & shapes. + void set_weight(real_t p_weight); real_t get_weight() const; |