diff options
| author | m4nu3lf <m4nu3lf@gmail.com> | 2016-12-31 14:39:25 +0000 |
|---|---|---|
| committer | m4nu3lf <m4nu3lf@gmail.com> | 2017-01-09 00:13:54 +0000 |
| commit | 2e38b32e0f261445c2d0b095c1822fbe6df16e25 (patch) | |
| tree | 7add49833c34260d581424469818573abd44104a /servers/physics_server.cpp | |
| parent | f2e99826c0b1e8227644bfab0795d858c504d279 (diff) | |
| download | redot-engine-2e38b32e0f261445c2d0b095c1822fbe6df16e25.tar.gz | |
Fixed inertia tensor computation and center of mass
Diffstat (limited to 'servers/physics_server.cpp')
| -rw-r--r-- | servers/physics_server.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/servers/physics_server.cpp b/servers/physics_server.cpp index 32c8da66ff..bbbbfdf3ab 100644 --- a/servers/physics_server.cpp +++ b/servers/physics_server.cpp @@ -78,6 +78,9 @@ void PhysicsDirectBodyState::_bind_methods() { ClassDB::bind_method(_MD("get_total_linear_damp"),&PhysicsDirectBodyState::get_total_linear_damp); ClassDB::bind_method(_MD("get_total_angular_damp"),&PhysicsDirectBodyState::get_total_angular_damp); + ClassDB::bind_method(_MD("get_center_of_mass"),&PhysicsDirectBodyState::get_center_of_mass); + ClassDB::bind_method(_MD("get_principal_inetria_axes"),&PhysicsDirectBodyState::get_principal_inertia_axes); + ClassDB::bind_method(_MD("get_inverse_mass"),&PhysicsDirectBodyState::get_inverse_mass); ClassDB::bind_method(_MD("get_inverse_inertia"),&PhysicsDirectBodyState::get_inverse_inertia); @@ -92,6 +95,7 @@ void PhysicsDirectBodyState::_bind_methods() { ClassDB::bind_method(_MD("add_force","force","pos"),&PhysicsDirectBodyState::add_force); ClassDB::bind_method(_MD("apply_impulse","pos","j"),&PhysicsDirectBodyState::apply_impulse); + ClassDB::bind_method(_MD("apply_torqe_impulse","j"),&PhysicsDirectBodyState::apply_torque_impulse); ClassDB::bind_method(_MD("set_sleep_state","enabled"),&PhysicsDirectBodyState::set_sleep_state); ClassDB::bind_method(_MD("is_sleeping"),&PhysicsDirectBodyState::is_sleeping); @@ -517,6 +521,7 @@ void PhysicsServer::_bind_methods() { ClassDB::bind_method(_MD("body_get_state","body","state"),&PhysicsServer::body_get_state); ClassDB::bind_method(_MD("body_apply_impulse","body","pos","impulse"),&PhysicsServer::body_apply_impulse); + ClassDB::bind_method(_MD("body_apply_torque_impulse","body","impulse"),&PhysicsServer::body_apply_torque_impulse); ClassDB::bind_method(_MD("body_set_axis_velocity","body","axis_velocity"),&PhysicsServer::body_set_axis_velocity); ClassDB::bind_method(_MD("body_set_axis_lock","body","axis"),&PhysicsServer::body_set_axis_lock); |
