Skip to content

Commit

Permalink
raycast maxlen check
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrilgramblicka committed Sep 14, 2017
1 parent e96ddfd commit 331ed70
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/otbullet/ot_terrain_contact_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,10 @@ void ot_terrain_contact_common::collide_object_plane(fn_elevation_above_terrain

const double elev(elevation_above_terrain(pos, _sphere_radius, &hit_norm, &hit));

if (elev == _sphere_radius) {
return;
}

btStaticPlaneShape plane(btVector3(hit_norm.x, hit_norm.y, hit_norm.z).normalized(), glm::dot(glm::normalize(double3(hit_norm)), hit));
//btStaticPlaneShape plane(btVector3(norm.x,norm.y,norm.z),glm::dot(norm,pos - (norm*elev)));

Expand Down

0 comments on commit 331ed70

Please sign in to comment.