From 79dd2e1d6925a4afa5bf4d16abcf50592f291871 Mon Sep 17 00:00:00 2001 From: ycw Date: Sat, 15 Jun 2024 17:54:06 +0800 Subject: [PATCH] dont accumulate tiny translation --- examples/games_fps.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/games_fps.html b/examples/games_fps.html index 7dba1b4ae45d70..ac37f310c6ba44 100644 --- a/examples/games_fps.html +++ b/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 ) ); + + } }