diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-01-13 11:23:05 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-01-13 11:23:05 -0300 |
commit | 823d7ae3b554100fc35c6223568452c8fa7adf11 (patch) | |
tree | c2feed7fcbf86d534dde179bcc2e1b924d0e2187 /servers/physics_2d/physics_2d_server_sw.cpp | |
parent | 7c7ab30c4ef74f3e7a90ab6d23d69d545fac7cf3 (diff) | |
parent | 869f400179a32e951a44181165de48094693e280 (diff) |
Merge branch 'master' of https://github.com/okamstudio/godot
Diffstat (limited to 'servers/physics_2d/physics_2d_server_sw.cpp')
-rw-r--r-- | servers/physics_2d/physics_2d_server_sw.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/servers/physics_2d/physics_2d_server_sw.cpp b/servers/physics_2d/physics_2d_server_sw.cpp index ab85f5e1d6..f310ee0d9f 100644 --- a/servers/physics_2d/physics_2d_server_sw.cpp +++ b/servers/physics_2d/physics_2d_server_sw.cpp @@ -860,6 +860,22 @@ int Physics2DServerSW::body_get_max_contacts_reported(RID p_body) const { return body->get_max_contacts_reported(); } +void Physics2DServerSW::body_set_one_way_collision_direction(RID p_body,const Vector2& p_direction) { + + Body2DSW *body = body_owner.get(p_body); + ERR_FAIL_COND(!body); + body->set_one_way_collision_direction(p_direction); +} + +Vector2 Physics2DServerSW::body_get_one_way_collision_direction(RID p_body) const{ + + Body2DSW *body = body_owner.get(p_body); + ERR_FAIL_COND_V(!body,Vector2()); + return body->get_one_way_collision_direction(); + +} + + void Physics2DServerSW::body_set_force_integration_callback(RID p_body,Object *p_receiver,const StringName& p_method,const Variant& p_udata) { |