mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user