summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/resources/ray_shape_2d.cpp16
-rw-r--r--scene/resources/ray_shape_2d.h6
-rw-r--r--scene/resources/ray_shape_3d.cpp16
-rw-r--r--scene/resources/ray_shape_3d.h6
4 files changed, 22 insertions, 22 deletions
diff --git a/scene/resources/ray_shape_2d.cpp b/scene/resources/ray_shape_2d.cpp
index fb8f4b9985..2390a13bfa 100644
--- a/scene/resources/ray_shape_2d.cpp
+++ b/scene/resources/ray_shape_2d.cpp
@@ -36,7 +36,7 @@
void RayShape2D::_update_shape() {
Dictionary d;
d["length"] = length;
- d["slips_on_slope"] = slips_on_slope;
+ d["slide_on_slope"] = slide_on_slope;
PhysicsServer2D::get_singleton()->shape_set_data(get_rid(), d);
emit_changed();
}
@@ -88,11 +88,11 @@ void RayShape2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_length", "length"), &RayShape2D::set_length);
ClassDB::bind_method(D_METHOD("get_length"), &RayShape2D::get_length);
- ClassDB::bind_method(D_METHOD("set_slips_on_slope", "active"), &RayShape2D::set_slips_on_slope);
- ClassDB::bind_method(D_METHOD("get_slips_on_slope"), &RayShape2D::get_slips_on_slope);
+ ClassDB::bind_method(D_METHOD("set_slide_on_slope", "active"), &RayShape2D::set_slide_on_slope);
+ ClassDB::bind_method(D_METHOD("get_slide_on_slope"), &RayShape2D::get_slide_on_slope);
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length"), "set_length", "get_length");
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "slips_on_slope"), "set_slips_on_slope", "get_slips_on_slope");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "slide_on_slope"), "set_slide_on_slope", "get_slide_on_slope");
}
void RayShape2D::set_length(real_t p_length) {
@@ -104,13 +104,13 @@ real_t RayShape2D::get_length() const {
return length;
}
-void RayShape2D::set_slips_on_slope(bool p_active) {
- slips_on_slope = p_active;
+void RayShape2D::set_slide_on_slope(bool p_active) {
+ slide_on_slope = p_active;
_update_shape();
}
-bool RayShape2D::get_slips_on_slope() const {
- return slips_on_slope;
+bool RayShape2D::get_slide_on_slope() const {
+ return slide_on_slope;
}
RayShape2D::RayShape2D() :
diff --git a/scene/resources/ray_shape_2d.h b/scene/resources/ray_shape_2d.h
index 56ecfa2722..0895605ddf 100644
--- a/scene/resources/ray_shape_2d.h
+++ b/scene/resources/ray_shape_2d.h
@@ -37,7 +37,7 @@ class RayShape2D : public Shape2D {
GDCLASS(RayShape2D, Shape2D);
real_t length = 20.0;
- bool slips_on_slope = false;
+ bool slide_on_slope = false;
void _update_shape();
@@ -48,8 +48,8 @@ public:
void set_length(real_t p_length);
real_t get_length() const;
- void set_slips_on_slope(bool p_active);
- bool get_slips_on_slope() const;
+ void set_slide_on_slope(bool p_active);
+ bool get_slide_on_slope() const;
virtual void draw(const RID &p_to_rid, const Color &p_color) override;
virtual Rect2 get_rect() const override;
diff --git a/scene/resources/ray_shape_3d.cpp b/scene/resources/ray_shape_3d.cpp
index 5446b4daab..5d73fb8d80 100644
--- a/scene/resources/ray_shape_3d.cpp
+++ b/scene/resources/ray_shape_3d.cpp
@@ -47,7 +47,7 @@ real_t RayShape3D::get_enclosing_radius() const {
void RayShape3D::_update_shape() {
Dictionary d;
d["length"] = length;
- d["slips_on_slope"] = slips_on_slope;
+ d["slide_on_slope"] = slide_on_slope;
PhysicsServer3D::get_singleton()->shape_set_data(get_shape(), d);
Shape3D::_update_shape();
}
@@ -62,25 +62,25 @@ float RayShape3D::get_length() const {
return length;
}
-void RayShape3D::set_slips_on_slope(bool p_active) {
- slips_on_slope = p_active;
+void RayShape3D::set_slide_on_slope(bool p_active) {
+ slide_on_slope = p_active;
_update_shape();
notify_change_to_owners();
}
-bool RayShape3D::get_slips_on_slope() const {
- return slips_on_slope;
+bool RayShape3D::get_slide_on_slope() const {
+ return slide_on_slope;
}
void RayShape3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_length", "length"), &RayShape3D::set_length);
ClassDB::bind_method(D_METHOD("get_length"), &RayShape3D::get_length);
- ClassDB::bind_method(D_METHOD("set_slips_on_slope", "active"), &RayShape3D::set_slips_on_slope);
- ClassDB::bind_method(D_METHOD("get_slips_on_slope"), &RayShape3D::get_slips_on_slope);
+ ClassDB::bind_method(D_METHOD("set_slide_on_slope", "active"), &RayShape3D::set_slide_on_slope);
+ ClassDB::bind_method(D_METHOD("get_slide_on_slope"), &RayShape3D::get_slide_on_slope);
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "length", PROPERTY_HINT_RANGE, "0,4096,0.001"), "set_length", "get_length");
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "slips_on_slope"), "set_slips_on_slope", "get_slips_on_slope");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "slide_on_slope"), "set_slide_on_slope", "get_slide_on_slope");
}
RayShape3D::RayShape3D() :
diff --git a/scene/resources/ray_shape_3d.h b/scene/resources/ray_shape_3d.h
index 2da6311321..5369408185 100644
--- a/scene/resources/ray_shape_3d.h
+++ b/scene/resources/ray_shape_3d.h
@@ -35,7 +35,7 @@
class RayShape3D : public Shape3D {
GDCLASS(RayShape3D, Shape3D);
float length = 1.0;
- bool slips_on_slope = false;
+ bool slide_on_slope = false;
protected:
static void _bind_methods();
@@ -45,8 +45,8 @@ public:
void set_length(float p_length);
float get_length() const;
- void set_slips_on_slope(bool p_active);
- bool get_slips_on_slope() const;
+ void set_slide_on_slope(bool p_active);
+ bool get_slide_on_slope() const;
virtual Vector<Vector3> get_debug_mesh_lines() const override;
virtual real_t get_enclosing_radius() const override;