Switch iw4 xmodel axis to be Y Up and -Z Forward

This commit is contained in:
Jan 2021-08-01 01:13:01 +02:00
parent 24145e15e2
commit bb0adb0b22

View File

@ -108,7 +108,7 @@ void AssetDumperXModel::DumpObjLod(AssetDumpingContext& context, XAssetInfo<XMod
for (auto vi = 0; vi < surf->vertCount; vi++) for (auto vi = 0; vi < surf->vertCount; vi++)
{ {
const auto* vertex = &surf->verts0[vi]; const auto* vertex = &surf->verts0[vi];
stream << "v " << vertex->xyz[0] << " " << vertex->xyz[1] << " " << vertex->xyz[2] << "\n"; stream << "v " << vertex->xyz[0] << " " << vertex->xyz[2] << " " << -vertex->xyz[1] << "\n";
} }
stream << "\n"; stream << "\n";
@ -130,7 +130,7 @@ void AssetDumperXModel::DumpObjLod(AssetDumpingContext& context, XAssetInfo<XMod
vec3_t normalVec; vec3_t normalVec;
Common::Vec3UnpackUnitVec(vertex->normal, &normalVec); Common::Vec3UnpackUnitVec(vertex->normal, &normalVec);
stream << "vn " << normalVec[0] << " " << normalVec[1] << " " << normalVec[2] << "\n"; stream << "vn " << normalVec[0] << " " << normalVec[2] << " " << -normalVec[1] << "\n";
} }
stream << "\n"; stream << "\n";