Merge pull request #137 from teamfisk/Importer

Export and import of collision meshes
This commit is contained in:
Adam Byléhn
2016-03-14 04:26:50 +01:00
23 changed files with 368 additions and 225 deletions
+3 -3
View File
@@ -112,15 +112,15 @@ bool SpawnerSystem::spawnedEntityIsColliding(EntityWrapper spawnedEntity, Entity
if (!spawnedBox.Entity.HasComponent("Model")) {
return true;
}
RawModel* model = nullptr;
Model* model = nullptr;
try {
model = ResourceManager::Load<RawModel, true>(otherEntity["Model"]["Resource"]);
model = ResourceManager::Load<Model, true>(otherEntity["Model"]["Resource"]);
} catch (const std::exception&) {
}
if (model != nullptr && Collision::AABBvsTriangles(
spawnedBox,
model->Vertices(),
model->m_Vertices,
model->m_Indices,
TransformSystem::ModelMatrix(otherEntity))) {
return true;