Skip to content

Commit

Permalink
change collision logic to return inside point
Browse files Browse the repository at this point in the history
  • Loading branch information
unixpickle committed Mar 1, 2024
1 parent 4c3a410 commit 7c9cc22
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion model3d/collisions.go
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,8 @@ func (s *SolidCollider) bisectCollision(r *Ray, min, max float64) float64 {
min = f
}
}
return (min + max) / 2
// Always return the point inside the solid
return max
}

func (s *SolidCollider) approximateNormal(c Coord3D) Coord3D {
Expand Down

0 comments on commit 7c9cc22

Please sign in to comment.