diff --git a/examples/games_fps.html b/examples/games_fps.html index bc3736f63b86dd..bac4ddb39dd808 100644 --- a/examples/games_fps.html +++ b/examples/games_fps.html @@ -422,14 +422,18 @@ } ); - function teleportPlayerIfOob(){ - if (camera.position.y <= -25){ + function teleportPlayerIfOob() { + + if ( camera.position.y <= - 25 ) { + playerCollider.start.set( 0, 0.35, 0 ); playerCollider.end.set( 0, 1, 0 ); - playerCollider.radius = 0.35; + playerCollider.radius = 0.35; camera.position.copy( playerCollider.end ); camera.rotation.set( 0, 0, 0 ); + } + }