You should not be able to fall through ground or dash thru walls. Very thin objects may still be possible to go through, e.g. the grid border walls in GameMap.xml.

This commit is contained in:
William Moberg
2016-02-19 14:16:22 +01:00
parent 0d665c10fe
commit 22664848dc
5 changed files with 59 additions and 8 deletions
+1 -1
View File
@@ -207,7 +207,7 @@ bool RayVsModel(const Ray& ray,
glm::vec3 v0 = Transform::TransformPoint(modelVertices[modelIndices[i++]].Position, modelMatrix);
glm::vec3 v1 = Transform::TransformPoint(modelVertices[modelIndices[i++]].Position, modelMatrix);
glm::vec3 v2 = Transform::TransformPoint(modelVertices[modelIndices[i++]].Position, modelMatrix);
float dist = INFINITY;
float dist = outDistance;
float u;
float v;
if (RayVsTriangle(ray, v0, v1, v2, dist, u, v)) {