added COllisionManager

This commit is contained in:
2024-01-05 19:21:24 -06:00
parent 7c28efb47c
commit c25fdf3823
4 changed files with 36 additions and 28 deletions
+2 -2
View File
@@ -26,14 +26,14 @@ public class Mesh {
return false;
//character moving is higher than the max Y of this mesh
if(charHeight < this.meshHeight)
if(charHeight > this.meshHeight)
return false;
for(Triangle tri : triangles)
if(tri.collides(line))
return true;
//characters movement path did not intersect this triangle
//characters movement path did not intersect this mesh
return false;
}
}