Skip to content

Commit

Permalink
#32 - Fixing camera position when debug is switched off
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbrzeski committed Jul 1, 2024
1 parent b478fa2 commit 53e5158
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client/src/app/scenograph/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,9 @@ export default class Controls {
debug_off() {
this.orbit.dispose();
this.orbit = false;

// Reset camera y position after disengaging orbit controls.
l.current_scene.camera.position.copy( l.current_scene.scene_objects.ship.mesh.position );
l.current_scene.camera.position.y += 10.775 / 4;
}
}

0 comments on commit 53e5158

Please sign in to comment.