From a930797c31d4ee1a00e03cfc1055fd4cb8af9a14 Mon Sep 17 00:00:00 2001 From: Andrea Catania Date: Fri, 16 Feb 2018 17:48:07 +0100 Subject: Added Physics state APIs --- modules/bullet/rigid_body_bullet.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'modules/bullet/rigid_body_bullet.cpp') 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); } -- cgit v1.2.3