summaryrefslogtreecommitdiff
path: root/scene/resources/sphere_shape.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/sphere_shape.cpp')
-rw-r--r--scene/resources/sphere_shape.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/scene/resources/sphere_shape.cpp b/scene/resources/sphere_shape.cpp
index f408717834..825708d1e2 100644
--- a/scene/resources/sphere_shape.cpp
+++ b/scene/resources/sphere_shape.cpp
@@ -55,6 +55,10 @@ Vector<Vector3> SphereShape::get_debug_mesh_lines() {
return points;
}
+real_t SphereShape::get_enclosing_radius() const {
+ return radius;
+}
+
void SphereShape::_update_shape() {
PhysicsServer::get_singleton()->shape_set_data(get_shape(), radius);
@@ -79,7 +83,7 @@ void SphereShape::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_radius", "radius"), &SphereShape::set_radius);
ClassDB::bind_method(D_METHOD("get_radius"), &SphereShape::get_radius);
- ADD_PROPERTY(PropertyInfo(Variant::REAL, "radius", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_radius", "get_radius");
+ ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "radius", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_radius", "get_radius");
}
SphereShape::SphereShape() :