feat: nouveau plane
feat: + Ajout d'un nouveau plane, l'ancien etait casse + "Ajout" des colisions avec les planes, les planes sont traites comme des cubes
This commit is contained in:
parent
9dd129b7bc
commit
daa9aa7023
@ -1291,7 +1291,7 @@ void ApplicationClass::GenerateTerrain()
|
||||
scaleMatrix = XMMatrixScaling(scaleX, scaleY, scaleZ);
|
||||
|
||||
// Set the file name of the model.
|
||||
strcpy_s(modelFilename, "cube.txt");
|
||||
strcpy_s(modelFilename, "plane.txt");
|
||||
strcpy_s(textureFilename, "stone01.tga");
|
||||
strcpy_s(textureFilename2, "moss01.tga");
|
||||
strcpy_s(textureFilename3, "alpha01.tga");
|
||||
|
@ -129,9 +129,6 @@
|
||||
<ClCompile Include="alphamapshaderclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="normalmapshaderclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="specmapshaderclass.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
@ -159,6 +156,9 @@
|
||||
<ClCompile Include="physics.cpp">
|
||||
<Filter>Fichiers sources</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="normalmapshaderclass.cpp">
|
||||
<Filter>Assets</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="systemclass.h">
|
||||
@ -402,11 +402,11 @@
|
||||
<Text Include="sphere.txt">
|
||||
<Filter>Assets</Filter>
|
||||
</Text>
|
||||
<Text Include="plane.txt">
|
||||
<Filter>Assets</Filter>
|
||||
</Text>
|
||||
<Text Include="square.txt">
|
||||
<Filter>assets</Filter>
|
||||
</Text>
|
||||
<Text Include="plane.txt">
|
||||
<Filter>Assets</Filter>
|
||||
</Text>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -11,6 +11,6 @@ Pos=7,299
|
||||
Size=492,353
|
||||
|
||||
[Window][Terrain]
|
||||
Pos=692,768
|
||||
Pos=691,769
|
||||
Size=418,94
|
||||
|
||||
|
@ -83,6 +83,10 @@ bool Physics::IsColliding(Object* object1, Object* object2)
|
||||
std::string type1 = object1->GetName();
|
||||
std::string type2 = object2->GetName();
|
||||
|
||||
// Treat "plane" objects as "cube"
|
||||
if (type1 == "plane") type1 = "cube";
|
||||
if (type2 == "plane") type2 = "cube";
|
||||
|
||||
if (type1 == "cube" && type2 == "cube")
|
||||
{
|
||||
return CubesOverlap(object1, object2);
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user