Skip to content

Commit c48237b

Browse files
authored
Merge pull request #8351 from nakednous/fix-camera-slerp-ortho-state
Fix Camera.slerp for ortho by cloning projMatrix into uPMatrix when active
2 parents f19664a + f607b53 commit c48237b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/webgl/p5.Camera.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1602,8 +1602,7 @@ class Camera {
16021602
);
16031603
// If the camera is active, make uPMatrix reflect changes in projMatrix.
16041604
if (this._isActive()) {
1605-
this._renderer.states.setValue('uPMatrix', this._renderer.states.uPMatrix.clone());
1606-
this._renderer.states.uPMatrix.mat4 = this.projMatrix.mat4.slice();
1605+
this._renderer.states.setValue('uPMatrix', this.projMatrix.clone());
16071606
}
16081607
}
16091608

0 commit comments

Comments
 (0)