Procházet zdrojové kódy

Merge pull request #245 from Jason0214/fix_concave_collision

Generate concave shapes has godot does
Lu Jiacheng před 6 roky
rodič
revize
9c4d1874a3

+ 2 - 2
io_scene_godot/converters/physics.py

@@ -185,8 +185,8 @@ def generate_concave_shape(escn_file, export_settings, bl_object):
     if mesh is not None and mesh.polygons:
         vert_array = list()
         for poly in mesh.polygons:
-            for vert_id in poly.vertices:
-                vert_array.append(list(mesh.vertices[vert_id].co))
+            for vert_id in reversed(poly.vertices):
+                vert_array.append(mesh.vertices[vert_id].co)
 
         col_shape = InternalResource("ConcavePolygonShape", mesh.name)
         col_shape['data'] = Array("PoolVector3Array(", values=vert_array)

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
tests/reference_exports/mesh/physics.escn


Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů