diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-08-28 20:57:27 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-08-28 20:59:01 -0300 |
commit | 748836e0b373a0139c11473f862c8071bed244b7 (patch) | |
tree | 2a6e4c601f388808d2c2f7c5bb73fa6b9f2108ce /scene/2d/physics_body_2d.h | |
parent | 1b80edafcaeca5c9f61c86448a16238fd82bb6da (diff) |
Several all around fixes to visual scripting (in the process of creating demos)
Diffstat (limited to 'scene/2d/physics_body_2d.h')
-rw-r--r-- | scene/2d/physics_body_2d.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scene/2d/physics_body_2d.h b/scene/2d/physics_body_2d.h index 5af65bff33..387267cd09 100644 --- a/scene/2d/physics_body_2d.h +++ b/scene/2d/physics_body_2d.h @@ -302,6 +302,12 @@ class KinematicBody2D : public PhysicsBody2D { Variant collider_metadata; Vector2 travel; + Vector2 move_and_slide_floor_velocity; + bool move_and_slide_on_floor; + bool move_and_slide_on_ceiling; + bool move_and_slide_on_wall; + Array move_and_slide_colliders; + Variant _get_collider() const; _FORCE_INLINE_ bool _ignores_mode(Physics2DServer::BodyMode) const; @@ -329,6 +335,13 @@ public: void set_collision_margin(float p_margin); float get_collision_margin() const; + Vector2 move_and_slide(const Vector2& p_linear_velocity,const Vector2& p_floor_direction=Vector2(0,0),int p_max_bounces=4); + bool is_move_and_slide_on_floor() const; + bool is_move_and_slide_on_wall() const; + bool is_move_and_slide_on_ceiling() const; + Array get_move_and_slide_colliders() const; + + KinematicBody2D(); ~KinematicBody2D(); |