summaryrefslogtreecommitdiff
path: root/scene/2d/physics_body_2d.h
diff options
context:
space:
mode:
authorGilles Roudière <gilles.roudiere@gmail.com>2021-08-31 16:29:14 +0200
committerGitHub <noreply@github.com>2021-08-31 16:29:14 +0200
commit71dd26dd43cbe1fc988f260c85d2c320f8124e3c (patch)
tree950e4bdd223a5690bb099ac2ecd627dad49ae43a /scene/2d/physics_body_2d.h
parent7ab78c4cad2823a30603a082ac98b92f91ac64a5 (diff)
parent1a481c819160eff5bc4d5dc77bfb9e2f38bceef9 (diff)
Merge pull request #52269 from fabriceci/change-platform-detection
Change platform detection by allowing select layers by type (wall or …
Diffstat (limited to 'scene/2d/physics_body_2d.h')
-rw-r--r--scene/2d/physics_body_2d.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/scene/2d/physics_body_2d.h b/scene/2d/physics_body_2d.h
index 885f0ace05..612dbd192d 100644
--- a/scene/2d/physics_body_2d.h
+++ b/scene/2d/physics_body_2d.h
@@ -310,7 +310,8 @@ private:
float floor_snap_length = 0;
real_t free_mode_min_slide_angle = Math::deg2rad((real_t)15.0);
Vector2 up_direction = Vector2(0.0, -1.0);
- uint32_t moving_platform_ignore_layers = 0;
+ uint32_t moving_platform_floor_layers = UINT32_MAX;
+ uint32_t moving_platform_wall_layers = 0;
Vector2 linear_velocity;
Vector2 floor_normal;
@@ -350,8 +351,11 @@ private:
real_t get_free_mode_min_slide_angle() const;
void set_free_mode_min_slide_angle(real_t p_radians);
- uint32_t get_moving_platform_ignore_layers() const;
- void set_moving_platform_ignore_layers(const uint32_t p_exclude_layer);
+ uint32_t get_moving_platform_floor_layers() const;
+ void set_moving_platform_floor_layers(const uint32_t p_exclude_layer);
+
+ uint32_t get_moving_platform_wall_layers() const;
+ void set_moving_platform_wall_layers(const uint32_t p_exclude_layer);
void set_motion_mode(MotionMode p_mode);
MotionMode get_motion_mode() const;