Przeglądaj źródła

Examples: Fix floor threshold in `games_fps`. (#33053)

Michael Herzog 2 miesięcy temu
rodzic
commit
e61ab90bd7
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3 1
      examples/games_fps.html

+ 3 - 1
examples/games_fps.html

@@ -203,7 +203,9 @@
 
 
 				if ( result ) {
 				if ( result ) {
 
 
-					playerOnFloor = result.normal.y > 0;
+					// determine if the surface we bumped into is something we can stand on
+
+					playerOnFloor = result.normal.y >= 0.15; // allow slopes up to ~81° but ignore sheer vertical walls
 
 
 					if ( ! playerOnFloor ) {
 					if ( ! playerOnFloor ) {
 
 

粤ICP备19079148号