summaryrefslogtreecommitdiff
path: root/modules/bullet/rigid_body_bullet.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-02-19 20:22:18 +0100
committerGitHub <noreply@github.com>2018-02-19 20:22:18 +0100
commitbe67f2e4ba1bc2d36a9705328cf0b87aada9c3d7 (patch)
tree04c428098201e3baa8555f0733d43ce8ad90f0c1 /modules/bullet/rigid_body_bullet.cpp
parent6d99975707e51b5925c847fac4e88a55d5981408 (diff)
parenta930797c31d4ee1a00e03cfc1055fd4cb8af9a14 (diff)
Merge pull request #16751 from AndreaCatania/moreAPIs
Added Physics state APIs
Diffstat (limited to 'modules/bullet/rigid_body_bullet.cpp')
-rw-r--r--modules/bullet/rigid_body_bullet.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp
index f96218ef46..75b4cc054a 100644
--- a/modules/bullet/rigid_body_bullet.cpp
+++ b/modules/bullet/rigid_body_bullet.cpp
@@ -114,10 +114,18 @@ Transform BulletPhysicsDirectBodyState::get_transform() const {
return body->get_transform();
}
+void BulletPhysicsDirectBodyState::add_central_force(const Vector3 &p_force) {
+ body->apply_central_force(p_force);
+}
+
void BulletPhysicsDirectBodyState::add_force(const Vector3 &p_force, const Vector3 &p_pos) {
body->apply_force(p_force, p_pos);
}
+void BulletPhysicsDirectBodyState::add_torque(const Vector3 &p_torque) {
+ body->apply_torque(p_torque);
+}
+
void BulletPhysicsDirectBodyState::apply_impulse(const Vector3 &p_pos, const Vector3 &p_j) {
body->apply_impulse(p_pos, p_j);
}