Nez.Portable/ECS/Camera.cs
/// <summary>
/// when the scene render target size changes we update the cameras origin and adjust the position to keep it where it was
/// </summary>
/// <param name="newWidth">New width.</param>
/// <param name="newHeight">New height.</param>
when the scene render target size changes we update the cameras origin and adjust the position to keep it where it was
when the scene render target size changes we update the cameras origin and adjust the position to keep it where it was
internal void onSceneRenderTargetSizeChanged(int newWidth, int newHeight)
        {
            _isProjectionMatrixDirty = true;
            var oldOrigin = _origin;
            origin = new Vector2(newWidth / 2f, newHeight / 2f);
            entity.transform.position += _origin - oldOrigin;
        }
internal void onSceneRenderTargetSizeChanged ( int newWidth , int newHeight ) { _isProjectionMatrixDirty = true ; var oldOrigin = _origin ; origin = new Vector2 ( newWidth / 2f , newHeight / 2f ) ; entity . transform . position += _origin - oldOrigin ; }
when the scene render target size changes we update the cameras origin and adjust the position to keep it where it was
when the scene render target size changes we update the cameras origin and adjust the position to keep it where it was
// offset our position to match the new center
newWidth
int
None
newHeight
int
None