mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 14:24:56 +00:00
Add flip flag for collision triangles
This commit is contained in:
@@ -329,7 +329,10 @@ def cookcol(writebuf, mesh_obj):
|
|||||||
edge_idxs = []
|
edge_idxs = []
|
||||||
for loopi in p.loop_indices:
|
for loopi in p.loop_indices:
|
||||||
edge_idxs.append(copy_mesh.loops[loopi].edge_index)
|
edge_idxs.append(copy_mesh.loops[loopi].edge_index)
|
||||||
writebuf(struct.pack('IIII', edge_idxs[0], edge_idxs[1], edge_idxs[2], p.material_index))
|
l0 = copy_mesh.loops[p.loop_indices[0]]
|
||||||
|
e0 = copy_mesh.edges[l0.edge_index]
|
||||||
|
flip = l0.vertex_index != e0.vertices[0]
|
||||||
|
writebuf(struct.pack('IIIIb', edge_idxs[0], edge_idxs[1], edge_idxs[2], p.material_index, flip))
|
||||||
|
|
||||||
# Delete copied mesh from scene
|
# Delete copied mesh from scene
|
||||||
bpy.context.scene.objects.unlink(copy_obj)
|
bpy.context.scene.objects.unlink(copy_obj)
|
||||||
|
|||||||
2
hecl/extern/boo
vendored
2
hecl/extern/boo
vendored
Submodule hecl/extern/boo updated: 1259255f34...2db777eead
@@ -671,6 +671,7 @@ public:
|
|||||||
{
|
{
|
||||||
uint32_t edges[3];
|
uint32_t edges[3];
|
||||||
uint32_t matIdx;
|
uint32_t matIdx;
|
||||||
|
bool flip;
|
||||||
Triangle(BlenderConnection& conn);
|
Triangle(BlenderConnection& conn);
|
||||||
};
|
};
|
||||||
std::vector<Triangle> trianges;
|
std::vector<Triangle> trianges;
|
||||||
|
|||||||
@@ -1092,7 +1092,7 @@ BlenderConnection::DataStream::ColMesh::Edge::Edge(BlenderConnection& conn)
|
|||||||
|
|
||||||
BlenderConnection::DataStream::ColMesh::Triangle::Triangle(BlenderConnection& conn)
|
BlenderConnection::DataStream::ColMesh::Triangle::Triangle(BlenderConnection& conn)
|
||||||
{
|
{
|
||||||
conn._readBuf(this, 16);
|
conn._readBuf(this, 17);
|
||||||
}
|
}
|
||||||
|
|
||||||
BlenderConnection::DataStream::World::Area::Dock::Dock(BlenderConnection& conn)
|
BlenderConnection::DataStream::World::Area::Dock::Dock(BlenderConnection& conn)
|
||||||
|
|||||||
Reference in New Issue
Block a user