aboutsummaryrefslogtreecommitdiff
path: root/scene/3d/physics_body.cpp
diff options
context:
space:
mode:
authorRémi Verschelde2018-02-19 21:38:33 +0100
committerGitHub2018-02-19 21:38:33 +0100
commita41c45c3358b22e19ef8ac7772826e6b15fc9458 (patch)
tree5776c8ed462d227edb1a3462d24c5372190dfa83 /scene/3d/physics_body.cpp
parentaeed774fef63c37b6894d889d6dc98202ee24ed0 (diff)
parentcdd8334585a02ed3fe9766abe0e625d866f0b271 (diff)
downloadgodot-a41c45c3358b22e19ef8ac7772826e6b15fc9458.tar.gz
godot-a41c45c3358b22e19ef8ac7772826e6b15fc9458.tar.zst
godot-a41c45c3358b22e19ef8ac7772826e6b15fc9458.zip
Diffstat (limited to 'scene/3d/physics_body.cpp')
-rw-r--r--scene/3d/physics_body.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp
index 5c814312d..ad94c19c3 100644
--- a/scene/3d/physics_body.cpp
+++ b/scene/3d/physics_body.cpp
@@ -694,6 +694,10 @@ void RigidBody::apply_impulse(const Vector3 &p_pos, const Vector3 &p_impulse) {
PhysicsServer::get_singleton()->body_apply_impulse(get_rid(), p_pos, p_impulse);
}
+void RigidBody::apply_torque_impulse(const Vector3 &p_impulse) {
+ PhysicsServer::get_singleton()->body_apply_torque_impulse(get_rid(), p_impulse);
+}
+
void RigidBody::set_use_continuous_collision_detection(bool p_enable) {
ccd = p_enable;
@@ -833,6 +837,7 @@ void RigidBody::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_axis_velocity", "axis_velocity"), &RigidBody::set_axis_velocity);
ClassDB::bind_method(D_METHOD("apply_impulse", "position", "impulse"), &RigidBody::apply_impulse);
+ ClassDB::bind_method(D_METHOD("apply_torque_impulse", "impulse"), &RigidBody::apply_torque_impulse);
ClassDB::bind_method(D_METHOD("set_sleeping", "sleeping"), &RigidBody::set_sleeping);
ClassDB::bind_method(D_METHOD("is_sleeping"), &RigidBody::is_sleeping);