diff options
Diffstat (limited to 'scene/resources/sphere_shape_3d.cpp')
-rw-r--r-- | scene/resources/sphere_shape_3d.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/scene/resources/sphere_shape_3d.cpp b/scene/resources/sphere_shape_3d.cpp index 153db4c291..d24998ff18 100644 --- a/scene/resources/sphere_shape_3d.cpp +++ b/scene/resources/sphere_shape_3d.cpp @@ -32,13 +32,11 @@ #include "servers/physics_server_3d.h" Vector<Vector3> SphereShape3D::get_debug_mesh_lines() { - float r = get_radius(); Vector<Vector3> points; for (int i = 0; i <= 360; i++) { - float ra = Math::deg2rad((float)i); float rb = Math::deg2rad((float)i + 1); Point2 a = Vector2(Math::sin(ra), Math::cos(ra)) * r; @@ -60,13 +58,11 @@ real_t SphereShape3D::get_enclosing_radius() const { } void SphereShape3D::_update_shape() { - PhysicsServer3D::get_singleton()->shape_set_data(get_shape(), radius); Shape3D::_update_shape(); } void SphereShape3D::set_radius(float p_radius) { - radius = p_radius; _update_shape(); notify_change_to_owners(); @@ -74,12 +70,10 @@ void SphereShape3D::set_radius(float p_radius) { } float SphereShape3D::get_radius() const { - return radius; } void SphereShape3D::_bind_methods() { - ClassDB::bind_method(D_METHOD("set_radius", "radius"), &SphereShape3D::set_radius); ClassDB::bind_method(D_METHOD("get_radius"), &SphereShape3D::get_radius); @@ -88,6 +82,5 @@ void SphereShape3D::_bind_methods() { SphereShape3D::SphereShape3D() : Shape3D(PhysicsServer3D::get_singleton()->shape_create(PhysicsServer3D::SHAPE_SPHERE)) { - set_radius(1.0); } |