Merge pull request #137 from teamfisk/Importer
Export and import of collision meshes
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user