Bläddra i källkod

Generate concave shapes has godot does

Generate concave shapes with inverted faces as Godot does
Andrea Catania 7 år sedan
förälder
incheckning
89f07c64ab
2 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      io_scene_godot/converters/physics.py
  2. 0 0
      tests/reference_exports/mesh/physics.escn

+ 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)

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
tests/reference_exports/mesh/physics.escn


Vissa filer visades inte eftersom för många filer har ändrats