summaryrefslogtreecommitdiff
path: root/servers/physics_2d
diff options
context:
space:
mode:
Diffstat (limited to 'servers/physics_2d')
-rw-r--r--servers/physics_2d/collision_solver_2d_sw.cpp2
-rw-r--r--servers/physics_2d/shape_2d_sw.cpp4
-rw-r--r--servers/physics_2d/shape_2d_sw.h4
-rw-r--r--servers/physics_2d/space_2d_sw.cpp4
4 files changed, 7 insertions, 7 deletions
diff --git a/servers/physics_2d/collision_solver_2d_sw.cpp b/servers/physics_2d/collision_solver_2d_sw.cpp
index 34c94150e2..5337c8af56 100644
--- a/servers/physics_2d/collision_solver_2d_sw.cpp
+++ b/servers/physics_2d/collision_solver_2d_sw.cpp
@@ -117,7 +117,7 @@ bool CollisionSolver2DSW::solve_raycast(const Shape2DSW *p_shape_A, const Vector
}
Vector2 support_B = p_transform_B.xform(p);
- if (ray->get_slips_on_slope()) {
+ if (ray->get_slide_on_slope()) {
Vector2 global_n = invb.basis_xform_inv(n).normalized();
support_B = support_A + (support_B - support_A).length() * global_n;
}
diff --git a/servers/physics_2d/shape_2d_sw.cpp b/servers/physics_2d/shape_2d_sw.cpp
index a82f0c2e6f..dae5669488 100644
--- a/servers/physics_2d/shape_2d_sw.cpp
+++ b/servers/physics_2d/shape_2d_sw.cpp
@@ -168,14 +168,14 @@ real_t RayShape2DSW::get_moment_of_inertia(real_t p_mass, const Size2 &p_scale)
void RayShape2DSW::set_data(const Variant &p_data) {
Dictionary d = p_data;
length = d["length"];
- slips_on_slope = d["slips_on_slope"];
+ slide_on_slope = d["slide_on_slope"];
configure(Rect2(0, 0, 0.001, length));
}
Variant RayShape2DSW::get_data() const {
Dictionary d;
d["length"] = length;
- d["slips_on_slope"] = slips_on_slope;
+ d["slide_on_slope"] = slide_on_slope;
return d;
}
diff --git a/servers/physics_2d/shape_2d_sw.h b/servers/physics_2d/shape_2d_sw.h
index 6813e25a0b..541d35dae9 100644
--- a/servers/physics_2d/shape_2d_sw.h
+++ b/servers/physics_2d/shape_2d_sw.h
@@ -181,11 +181,11 @@ public:
class RayShape2DSW : public Shape2DSW {
real_t length;
- bool slips_on_slope;
+ bool slide_on_slope;
public:
_FORCE_INLINE_ real_t get_length() const { return length; }
- _FORCE_INLINE_ bool get_slips_on_slope() const { return slips_on_slope; }
+ _FORCE_INLINE_ bool get_slide_on_slope() const { return slide_on_slope; }
virtual PhysicsServer2D::ShapeType get_type() const { return PhysicsServer2D::SHAPE_RAY; }
diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp
index 169c419b3b..92b87cea23 100644
--- a/servers/physics_2d/space_2d_sw.cpp
+++ b/servers/physics_2d/space_2d_sw.cpp
@@ -730,8 +730,8 @@ bool Space2DSW::test_body_motion(Body2DSW *p_body, const Transform2D &p_from, co
// Colliding separation rays allows to properly snap to the ground,
// otherwise it's not needed in regular motion.
if (!p_collide_separation_ray && (body_shape->get_type() == PhysicsServer2D::SHAPE_RAY)) {
- // When slips on slope is on, separation ray shape acts like a regular shape.
- if (!static_cast<RayShape2DSW *>(body_shape)->get_slips_on_slope()) {
+ // When slide on slope is on, separation ray shape acts like a regular shape.
+ if (!static_cast<RayShape2DSW *>(body_shape)->get_slide_on_slope()) {
continue;
}
}