diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-07-23 07:37:03 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-23 07:37:03 -0300 |
commit | 1ad20dc2f13001d95e91cb2089571028f44db11a (patch) | |
tree | 86e45829815fd357454012b19c291887c67caa1a /modules/bullet/bullet_physics_server.cpp | |
parent | 172f652dc0c31a9a70ad24e233e6d7abc3ee9c6d (diff) | |
parent | 5f66734d2d70951b273a078a3ee20e406cf0f84d (diff) | |
download | redot-engine-1ad20dc2f13001d95e91cb2089571028f44db11a.tar.gz |
Merge pull request #12403 from AndreaCatania/phymat
Physics material
Diffstat (limited to 'modules/bullet/bullet_physics_server.cpp')
-rw-r--r-- | modules/bullet/bullet_physics_server.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/bullet/bullet_physics_server.cpp b/modules/bullet/bullet_physics_server.cpp index 54431f93f1..77484c9efc 100644 --- a/modules/bullet/bullet_physics_server.cpp +++ b/modules/bullet/bullet_physics_server.cpp @@ -647,6 +647,20 @@ float BulletPhysicsServer::body_get_param(RID p_body, BodyParameter p_param) con return body->get_param(p_param); } +void BulletPhysicsServer::body_set_combine_mode(RID p_body, BodyParameter p_param, CombineMode p_mode) { + RigidBodyBullet *body = rigid_body_owner.get(p_body); + ERR_FAIL_COND(!body); + + body->set_combine_mode(p_param, p_mode); +} + +PhysicsServer::CombineMode BulletPhysicsServer::body_get_combine_mode(RID p_body, BodyParameter p_param) const { + RigidBodyBullet *body = rigid_body_owner.get(p_body); + ERR_FAIL_COND_V(!body, COMBINE_MODE_INHERIT); + + return body->get_combine_mode(p_param); +} + void BulletPhysicsServer::body_set_kinematic_safe_margin(RID p_body, real_t p_margin) { RigidBodyBullet *body = rigid_body_owner.get(p_body); ERR_FAIL_COND(!body); |