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 /servers/physics_2d_server.h | |
parent | 172f652dc0c31a9a70ad24e233e6d7abc3ee9c6d (diff) | |
parent | 5f66734d2d70951b273a078a3ee20e406cf0f84d (diff) |
Merge pull request #12403 from AndreaCatania/phymat
Physics material
Diffstat (limited to 'servers/physics_2d_server.h')
-rw-r--r-- | servers/physics_2d_server.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/servers/physics_2d_server.h b/servers/physics_2d_server.h index 1d04fbc5c6..89c649af49 100644 --- a/servers/physics_2d_server.h +++ b/servers/physics_2d_server.h @@ -416,6 +416,19 @@ public: virtual void body_set_param(RID p_body, BodyParameter p_param, float p_value) = 0; virtual float body_get_param(RID p_body, BodyParameter p_param) const = 0; + enum CombineMode { + COMBINE_MODE_MAX, + COMBINE_MODE_MIN, + COMBINE_MODE_MULTIPLY, + COMBINE_MODE_AVERAGE, + + COMBINE_MODE_INHERIT /// Inherit from other body or use COMBINE_MODE_MAX (Restitution) COMBINE_MODE_MULTIPLY (Friction) + }; + + /// p_param accept only Bounce and Friction + virtual void body_set_combine_mode(RID p_body, BodyParameter p_param, CombineMode p_mode) = 0; + virtual CombineMode body_get_combine_mode(RID p_body, BodyParameter p_param) const = 0; + //state enum BodyState { BODY_STATE_TRANSFORM, |