소스 검색

Make 'ConvexPolygonShape2D' start empty, so it's consistent with other shapes.

Michael Alexsander Silva Dias 6 년 전
부모
커밋
c7cfe5330c
2개의 변경된 파일0개의 추가작업 그리고 8개의 파일을 삭제
  1. 0 2
      scene/resources/convex_polygon_shape.cpp
  2. 0 6
      scene/resources/convex_polygon_shape_2d.cpp

+ 0 - 2
scene/resources/convex_polygon_shape.cpp

@@ -83,6 +83,4 @@ void ConvexPolygonShape::_bind_methods() {
 
 
 ConvexPolygonShape::ConvexPolygonShape() :
 ConvexPolygonShape::ConvexPolygonShape() :
 		Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_CONVEX_POLYGON)) {
 		Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_CONVEX_POLYGON)) {
-
-	//set_points(Vector3(1,1,1));
 }
 }

+ 0 - 6
scene/resources/convex_polygon_shape_2d.cpp

@@ -99,10 +99,4 @@ Rect2 ConvexPolygonShape2D::get_rect() const {
 
 
 ConvexPolygonShape2D::ConvexPolygonShape2D() :
 ConvexPolygonShape2D::ConvexPolygonShape2D() :
 		Shape2D(Physics2DServer::get_singleton()->convex_polygon_shape_create()) {
 		Shape2D(Physics2DServer::get_singleton()->convex_polygon_shape_create()) {
-
-	int pcount = 3;
-	for (int i = 0; i < pcount; i++)
-		points.push_back(Vector2(Math::sin(i * Math_PI * 2 / pcount), -Math::cos(i * Math_PI * 2 / pcount)) * 10);
-
-	_update_shape();
 }
 }