mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-07 00:09:14 +08:00
Fix camera interpolation bug (#858)
This commit is contained in:
1 parent
a32b2d5391
commit
724ec17d75
1 file changed
+3
@@ -60,6 +60,9 @@ export function get_curve_object_from_cameras(
|
|||||||
export function get_transform_matrix(position, lookat, up) {
|
export function get_transform_matrix(position, lookat, up) {
|
||||||
// normalize the vectors
|
// normalize the vectors
|
||||||
lookat.normalize();
|
lookat.normalize();
|
||||||
|
// make up orthogonal to lookat
|
||||||
|
const up_proj = lookat.clone().multiplyScalar(up.dot(lookat));
|
||||||
|
up.sub(up_proj);
|
||||||
up.normalize();
|
up.normalize();
|
||||||
|
|
||||||
// create a copy of the vector up
|
// create a copy of the vector up
|
||||||
|
|||||||
Reference in new issue
Block a user