浏览代码

dont accumulate tiny translation (#28662)

ycw 1 年之前
父节点
当前提交
9bc84141dc
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      examples/games_fps.html

+ 5 - 1
examples/games_fps.html

@@ -210,7 +210,11 @@
 
 					}
 
-					playerCollider.translate( result.normal.multiplyScalar( result.depth ) );
+					if ( result.depth >= 1e-10 ) {
+
+						playerCollider.translate( result.normal.multiplyScalar( result.depth ) );
+
+					}
 
 				}