diff options
Diffstat (limited to 'servers/physics_3d')
-rw-r--r-- | servers/physics_3d/collision_solver_3d_sw.cpp | 2 | ||||
-rw-r--r-- | servers/physics_3d/shape_3d_sw.cpp | 14 | ||||
-rw-r--r-- | servers/physics_3d/shape_3d_sw.h | 6 | ||||
-rw-r--r-- | servers/physics_3d/space_3d_sw.cpp | 4 |
4 files changed, 13 insertions, 13 deletions
diff --git a/servers/physics_3d/collision_solver_3d_sw.cpp b/servers/physics_3d/collision_solver_3d_sw.cpp index 8803b355d4..4a6a07534b 100644 --- a/servers/physics_3d/collision_solver_3d_sw.cpp +++ b/servers/physics_3d/collision_solver_3d_sw.cpp @@ -117,7 +117,7 @@ bool CollisionSolver3DSW::solve_ray(const Shape3DSW *p_shape_A, const Transform3 } Vector3 support_B = p_transform_B.xform(p); - if (ray->get_slips_on_slope()) { + if (ray->get_slide_on_slope()) { Vector3 global_n = ai.basis.xform_inv(n).normalized(); support_B = support_A + (support_B - support_A).length() * global_n; } diff --git a/servers/physics_3d/shape_3d_sw.cpp b/servers/physics_3d/shape_3d_sw.cpp index 42a0fb32b2..fcc97f56a3 100644 --- a/servers/physics_3d/shape_3d_sw.cpp +++ b/servers/physics_3d/shape_3d_sw.cpp @@ -170,8 +170,8 @@ real_t RayShape3DSW::get_length() const { return length; } -bool RayShape3DSW::get_slips_on_slope() const { - return slips_on_slope; +bool RayShape3DSW::get_slide_on_slope() const { + return slide_on_slope; } void RayShape3DSW::project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const { @@ -226,27 +226,27 @@ Vector3 RayShape3DSW::get_moment_of_inertia(real_t p_mass) const { return Vector3(); } -void RayShape3DSW::_setup(real_t p_length, bool p_slips_on_slope) { +void RayShape3DSW::_setup(real_t p_length, bool p_slide_on_slope) { length = p_length; - slips_on_slope = p_slips_on_slope; + slide_on_slope = p_slide_on_slope; configure(AABB(Vector3(0, 0, 0), Vector3(0.1, 0.1, length))); } void RayShape3DSW::set_data(const Variant &p_data) { Dictionary d = p_data; - _setup(d["length"], d["slips_on_slope"]); + _setup(d["length"], d["slide_on_slope"]); } Variant RayShape3DSW::get_data() const { Dictionary d; d["length"] = length; - d["slips_on_slope"] = slips_on_slope; + d["slide_on_slope"] = slide_on_slope; return d; } RayShape3DSW::RayShape3DSW() { length = 1; - slips_on_slope = false; + slide_on_slope = false; } /********** SPHERE *************/ diff --git a/servers/physics_3d/shape_3d_sw.h b/servers/physics_3d/shape_3d_sw.h index 9f18b83f07..a693288f7e 100644 --- a/servers/physics_3d/shape_3d_sw.h +++ b/servers/physics_3d/shape_3d_sw.h @@ -136,13 +136,13 @@ public: class RayShape3DSW : public Shape3DSW { real_t length; - bool slips_on_slope; + bool slide_on_slope; - void _setup(real_t p_length, bool p_slips_on_slope); + void _setup(real_t p_length, bool p_slide_on_slope); public: real_t get_length() const; - bool get_slips_on_slope() const; + bool get_slide_on_slope() const; virtual real_t get_area() const { return 0.0; } virtual PhysicsServer3D::ShapeType get_type() const { return PhysicsServer3D::SHAPE_RAY; } diff --git a/servers/physics_3d/space_3d_sw.cpp b/servers/physics_3d/space_3d_sw.cpp index 7ed17d6284..4ec03529cf 100644 --- a/servers/physics_3d/space_3d_sw.cpp +++ b/servers/physics_3d/space_3d_sw.cpp @@ -719,8 +719,8 @@ bool Space3DSW::test_body_motion(Body3DSW *p_body, const Transform3D &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() == PhysicsServer3D::SHAPE_RAY)) { - // When slips on slope is on, separation ray shape acts like a regular shape. - if (!static_cast<RayShape3DSW *>(body_shape)->get_slips_on_slope()) { + // When slide on slope is on, separation ray shape acts like a regular shape. + if (!static_cast<RayShape3DSW *>(body_shape)->get_slide_on_slope()) { continue; } } |