Skip to main content
added 12 characters in body
Source Link
Kevin Reid
  • 5.7k
  • 22
  • 30

If possible, compute the collision with the triangle mesh, not a single triangle., as follows:

Any time the sphere-triangle collision test decides the sphere is colliding with the edge of the triangle, that means you should instead be colliding the sphere with the adjacent triangle across that edge.

If both triangles think the collision is on edge, then use a normal determined by the contact point on the sphere, or perhaps (this might be better for height fields) the average of the two triangles' normals.

If possible, compute the collision with the triangle mesh, not a single triangle.

Any time the sphere-triangle collision test decides the sphere is colliding with the edge of the triangle, that means you should instead be colliding the sphere with the adjacent triangle across that edge.

If both triangles think the collision is on edge, then use a normal determined by the contact point on the sphere, or perhaps (this might be better for height fields) the average of the two triangles' normals.

If possible, compute the collision with the triangle mesh, not a single triangle, as follows:

Any time the sphere-triangle collision test decides the sphere is colliding with the edge of the triangle, that means you should instead be colliding the sphere with the adjacent triangle across that edge.

If both triangles think the collision is on edge, then use a normal determined by the contact point on the sphere, or perhaps (this might be better for height fields) the average of the two triangles' normals.

Source Link
Kevin Reid
  • 5.7k
  • 22
  • 30

If possible, compute the collision with the triangle mesh, not a single triangle.

Any time the sphere-triangle collision test decides the sphere is colliding with the edge of the triangle, that means you should instead be colliding the sphere with the adjacent triangle across that edge.

If both triangles think the collision is on edge, then use a normal determined by the contact point on the sphere, or perhaps (this might be better for height fields) the average of the two triangles' normals.