Camera removes the effect of scale (#11483)

* Camera removes the effect of scale

* Modify the camera scale matrix to multiply
This commit is contained in:
GengineJS
2022-06-13 18:44:20 +08:00
committed by GitHub
parent a20b8edafd
commit a4a260f3ce
+2
View File
@@ -733,6 +733,8 @@ export class Camera {
// view-projection
if (viewProjDirty) {
// Remove scale
Mat4.multiply(this._matView, new Mat4().scale(this._node.worldScale), this._matView);
Mat4.multiply(this._matViewProj, this._matProj, this._matView);
Mat4.invert(this._matViewProjInv, this._matViewProj);
this._frustum.update(this._matViewProj, this._matViewProjInv);