|
@@ -326,6 +326,8 @@ Object.assign( Matrix4.prototype, {
|
|
|
|
|
|
if ( z.lengthSq() === 0 ) {
|
|
|
|
|
|
+ // eye and target are in the same position
|
|
|
+
|
|
|
z.z = 1;
|
|
|
|
|
|
}
|
|
@@ -335,6 +337,8 @@ Object.assign( Matrix4.prototype, {
|
|
|
|
|
|
if ( x.lengthSq() === 0 ) {
|
|
|
|
|
|
+ // eye and target are in the same vertical
|
|
|
+
|
|
|
z.z += 0.0001;
|
|
|
x.crossVectors( up, z );
|
|
|
|