Skip to content

Commit

Permalink
[bug] fix axes viewer incorrect rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
WYK96 committed May 5, 2023
1 parent 1944ca6 commit cb10f8a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 34 deletions.
31 changes: 0 additions & 31 deletions viewers/nerf_viewer/client/src/SceneNode.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ function ViewerWindow(props){
// *********************** handle window resize ***********************

// *********************** spawn roaming camera ***********************

// the HUD camera must share the same sensibility configurations with the roaming camera
const panningSensibility = 2000;
const angularSensibilityX = 2000;
const angularSensibilityY = 2000;

const camera = new ArcRotateCamera(
"camera",
-Math.PI / 3,
Expand All @@ -121,9 +127,9 @@ function ViewerWindow(props){
);
camera.attachControl();
camera.fov = BABYLON.Tools.ToRadians(cameraFOV);
camera.panningSensibility = 2000;
camera.angularSensibilityX = 2000;
camera.angularSensibilityY = 2000;
camera.panningSensibility = panningSensibility;
camera.angularSensibilityX = angularSensibilityX;
camera.angularSensibilityY = angularSensibilityY;
camera.maxZ = 999;
camera.minZ = 0;
camera.wheelPrecision = 50;
Expand Down Expand Up @@ -186,6 +192,9 @@ function ViewerWindow(props){
cameraHUD.lowerRadiusLimit = 0.1;
cameraHUD.layerMask = 0x20000000;
cameraHUD.viewport = new Viewport(0.90, 0.85, 0.12, 0.17);
cameraHUD.panningSensibility = panningSensibility;
cameraHUD.angularSensibilityX = angularSensibilityX;
cameraHUD.angularSensibilityY = angularSensibilityY;

scene.activeCameras = [camera, cameraHUD]; // HUD camera must be the last
// *********************** spawn HUD camera ***********************
Expand Down

0 comments on commit cb10f8a

Please sign in to comment.