added COllisionManager
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user