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.
This commit is contained in:
parent
dbabe4c07c
commit
f7d31cec38
6 changed files with 30 additions and 4 deletions
|
|
@ -677,6 +677,7 @@ void Physics2DServer::_bind_methods() {
|
|||
BIND_CONSTANT( BODY_PARAM_BOUNCE );
|
||||
BIND_CONSTANT( BODY_PARAM_FRICTION );
|
||||
BIND_CONSTANT( BODY_PARAM_MASS );
|
||||
BIND_CONSTANT( BODY_PARAM_INERTIA );
|
||||
BIND_CONSTANT( BODY_PARAM_GRAVITY_SCALE );
|
||||
BIND_CONSTANT( BODY_PARAM_LINEAR_DAMP);
|
||||
BIND_CONSTANT( BODY_PARAM_ANGULAR_DAMP);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue