Skip to content

Commit

Permalink
Examples: Clean up. (#23133)
Browse files Browse the repository at this point in the history
  • Loading branch information
linbingquan authored Jan 3, 2022
1 parent 6010f81 commit d3f7dfa
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions examples/games_fps.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

}

}


Expand Down

0 comments on commit d3f7dfa

Please sign in to comment.