diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-01-13 21:19:11 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-01-13 21:19:11 -0300 |
commit | 9012cd408e240d6039120e56fdd47a0983890993 (patch) | |
tree | 328f98f53fe1f56861dba304ec5e7456fb31c6ae /servers/physics_2d/physics_2d_server_sw.h | |
parent | a327eee762e7f67b924b481a05268cacfbbed4ec (diff) |
-Add support for one-way collision in 2D (only works for kinematic body so far)
-Solve drawing order bug introduced in previous commit: solves #1214
Diffstat (limited to 'servers/physics_2d/physics_2d_server_sw.h')
-rw-r--r-- | servers/physics_2d/physics_2d_server_sw.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/servers/physics_2d/physics_2d_server_sw.h b/servers/physics_2d/physics_2d_server_sw.h index b56c6da19a..e9c499aaff 100644 --- a/servers/physics_2d/physics_2d_server_sw.h +++ b/servers/physics_2d/physics_2d_server_sw.h @@ -71,6 +71,8 @@ public: struct CollCbkData { + Vector2 valid_dir; + float valid_depth; int max; int amount; Vector2 *ptr; @@ -208,6 +210,10 @@ public: virtual void body_set_one_way_collision_direction(RID p_body,const Vector2& p_direction); virtual Vector2 body_get_one_way_collision_direction(RID p_body) const; + virtual void body_set_one_way_collision_max_depth(RID p_body,float p_max_depth); + virtual float body_get_one_way_collision_max_depth(RID p_body) const; + + virtual void body_set_force_integration_callback(RID p_body,Object *p_receiver,const StringName& p_method,const Variant& p_udata=Variant()); virtual bool body_collide_shape(RID p_body, int p_body_shape,RID p_shape, const Matrix32& p_shape_xform,const Vector2& p_motion,Vector2 *r_results,int p_result_max,int &r_result_count); |