cleanup and comment

This commit is contained in:
2024-01-07 19:14:18 -06:00
parent 969b36e6fd
commit 4bff36d7bb
+4 -10
View File
@@ -22,22 +22,16 @@ public class Mesh {
public boolean MeshCollides(Line2D line, float charHeight, float charY){
//movement path does not intersect this mesh
//if(line.intersects(boundsRect) == false)
//check if movement path intersects this mesh
if(!this.BoundsCollides(line))
return false;
//character moving is higher than the max Y of this mesh
float feet = charY;
float head = feet + charHeight;
if(head < this.minY && feet > this.maxY){
//check to see if the mesh collides between the characters feet and head locations
if((charY + charHeight) < this.minY && charY > this.maxY){
return false;
}
//if(charY > this.maxY && charHeight + charY < this.minY)
// return false;
//check if any triangles intersect the movement path
for(Triangle tri : triangles)
if(tri.collides(line))
return true;