Skip to content

Commit 724ec17

Browse files
authored
Fix camera interpolation bug (#858)
1 parent a32b2d5 commit 724ec17

File tree

1 file changed

+3
-0
lines changed
  • nerfstudio/viewer/app/src/modules/SidePanel/CameraPanel

1 file changed

+3
-0
lines changed

nerfstudio/viewer/app/src/modules/SidePanel/CameraPanel/curve.js

+3
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ export function get_curve_object_from_cameras(
6060
export function get_transform_matrix(position, lookat, up) {
6161
// normalize the vectors
6262
lookat.normalize();
63+
// make up orthogonal to lookat
64+
const up_proj = lookat.clone().multiplyScalar(up.dot(lookat));
65+
up.sub(up_proj);
6366
up.normalize();
6467

6568
// create a copy of the vector up

0 commit comments

Comments
 (0)