diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/physics_body_2d.cpp | 6 | ||||
-rw-r--r-- | scene/2d/physics_body_2d.h | 1 | ||||
-rw-r--r-- | scene/3d/physics_body_3d.cpp | 12 | ||||
-rw-r--r-- | scene/3d/physics_body_3d.h | 2 |
4 files changed, 0 insertions, 21 deletions
diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index 09bcbdbf0f..277541cf46 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -1778,10 +1778,6 @@ Vector2 KinematicCollision2D::get_collider_velocity() const { return result.collider_velocity; } -Variant KinematicCollision2D::get_collider_metadata() const { - return Variant(); -} - void KinematicCollision2D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_position"), &KinematicCollision2D::get_position); ClassDB::bind_method(D_METHOD("get_normal"), &KinematicCollision2D::get_normal); @@ -1795,7 +1791,6 @@ void KinematicCollision2D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_collider_shape"), &KinematicCollision2D::get_collider_shape); ClassDB::bind_method(D_METHOD("get_collider_shape_index"), &KinematicCollision2D::get_collider_shape_index); ClassDB::bind_method(D_METHOD("get_collider_velocity"), &KinematicCollision2D::get_collider_velocity); - ClassDB::bind_method(D_METHOD("get_collider_metadata"), &KinematicCollision2D::get_collider_metadata); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "position"), "", "get_position"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "normal"), "", "get_normal"); @@ -1808,5 +1803,4 @@ void KinematicCollision2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "collider_shape"), "", "get_collider_shape"); ADD_PROPERTY(PropertyInfo(Variant::INT, "collider_shape_index"), "", "get_collider_shape_index"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "collider_velocity"), "", "get_collider_velocity"); - ADD_PROPERTY(PropertyInfo(Variant::NIL, "collider_metadata", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT), "", "get_collider_metadata"); } diff --git a/scene/2d/physics_body_2d.h b/scene/2d/physics_body_2d.h index 92b7fd1648..70cc5cd9bf 100644 --- a/scene/2d/physics_body_2d.h +++ b/scene/2d/physics_body_2d.h @@ -459,7 +459,6 @@ public: Object *get_collider_shape() const; int get_collider_shape_index() const; Vector2 get_collider_velocity() const; - Variant get_collider_metadata() const; }; #endif // PHYSICS_BODY_2D_H diff --git a/scene/3d/physics_body_3d.cpp b/scene/3d/physics_body_3d.cpp index 9e2358ed39..ea9b7ac7ba 100644 --- a/scene/3d/physics_body_3d.cpp +++ b/scene/3d/physics_body_3d.cpp @@ -1987,11 +1987,6 @@ Vector3 KinematicCollision3D::get_collider_velocity(int p_collision_index) const return result.collisions[p_collision_index].collider_velocity; } -Variant KinematicCollision3D::get_collider_metadata(int p_collision_index) const { - ERR_FAIL_INDEX_V(p_collision_index, result.collision_count, Variant()); - return Variant(); -} - Vector3 KinematicCollision3D::get_best_position() const { return result.collision_count ? get_position() : Vector3(); } @@ -2028,10 +2023,6 @@ Vector3 KinematicCollision3D::get_best_collider_velocity() const { return result.collision_count ? get_collider_velocity() : Vector3(); } -Variant KinematicCollision3D::get_best_collider_metadata() const { - return result.collision_count ? get_collider_metadata() : Variant(); -} - void KinematicCollision3D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_travel"), &KinematicCollision3D::get_travel); ClassDB::bind_method(D_METHOD("get_remainder"), &KinematicCollision3D::get_remainder); @@ -2046,7 +2037,6 @@ void KinematicCollision3D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_collider_shape", "collision_index"), &KinematicCollision3D::get_collider_shape, DEFVAL(0)); ClassDB::bind_method(D_METHOD("get_collider_shape_index", "collision_index"), &KinematicCollision3D::get_collider_shape_index, DEFVAL(0)); ClassDB::bind_method(D_METHOD("get_collider_velocity", "collision_index"), &KinematicCollision3D::get_collider_velocity, DEFVAL(0)); - ClassDB::bind_method(D_METHOD("get_collider_metadata", "collision_index"), &KinematicCollision3D::get_collider_metadata, DEFVAL(0)); ClassDB::bind_method(D_METHOD("get_best_position"), &KinematicCollision3D::get_best_position); ClassDB::bind_method(D_METHOD("get_best_normal"), &KinematicCollision3D::get_best_normal); @@ -2057,7 +2047,6 @@ void KinematicCollision3D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_best_collider_shape"), &KinematicCollision3D::get_best_collider_shape); ClassDB::bind_method(D_METHOD("get_best_collider_shape_index"), &KinematicCollision3D::get_best_collider_shape_index); ClassDB::bind_method(D_METHOD("get_best_collider_velocity"), &KinematicCollision3D::get_best_collider_velocity); - ClassDB::bind_method(D_METHOD("get_best_collider_metadata"), &KinematicCollision3D::get_best_collider_metadata); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "travel"), "", "get_travel"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "remainder"), "", "get_remainder"); @@ -2071,7 +2060,6 @@ void KinematicCollision3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "collider_shape"), "", "get_best_collider_shape"); ADD_PROPERTY(PropertyInfo(Variant::INT, "collider_shape_index"), "", "get_best_collider_shape_index"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "collider_velocity"), "", "get_best_collider_velocity"); - ADD_PROPERTY(PropertyInfo(Variant::NIL, "collider_metadata", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NIL_IS_VARIANT), "", "get_best_collider_metadata"); } /////////////////////////////////////// diff --git a/scene/3d/physics_body_3d.h b/scene/3d/physics_body_3d.h index 0f25d2469f..916b2cd464 100644 --- a/scene/3d/physics_body_3d.h +++ b/scene/3d/physics_body_3d.h @@ -485,7 +485,6 @@ public: Object *get_collider_shape(int p_collision_index = 0) const; int get_collider_shape_index(int p_collision_index = 0) const; Vector3 get_collider_velocity(int p_collision_index = 0) const; - Variant get_collider_metadata(int p_collision_index = 0) const; Vector3 get_best_position() const; Vector3 get_best_normal() const; @@ -496,7 +495,6 @@ public: Object *get_best_collider_shape() const; int get_best_collider_shape_index() const; Vector3 get_best_collider_velocity() const; - Variant get_best_collider_metadata() const; }; class PhysicalBone3D : public PhysicsBody3D { |