Skip to content

f key focuses Game Canvas in scene view correctly - #345

Open
PaperPrototype wants to merge 1 commit into
ProwlEngine:mainfrom
PaperPrototype:game-canvas-fixes
Open

PaperPrototype wants to merge 1 commit into
ProwlEngine:mainfrom
PaperPrototype:game-canvas-fixes

Conversation

@PaperPrototype

@PaperPrototype PaperPrototype commented Aug 5, 2026

Copy link
Copy Markdown
Contributor
Screen.Recording.2026-08-05.at.7.18.32.PM.mov

clicking f to focus the Game Canvas now works correctly. Though by default you have to zoom in. I'm not sure if that is because max render distance is clipping it or not? @michaelsakharov any idea why it is not visible?

@michaelsakharov

Copy link
Copy Markdown
Contributor

The Editor has a Far Clip plane of I think 1000? which is reasonable, the issue is your focus is just placing the camera a bit to far back. Im not sure but maybe Unity adjusts far plane depending on last focused object? Im too tired to test that right now, i'll investigate how unity handles this tomorrow.

@sinnwrig

sinnwrig commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Unity changes the min/max clip of the scene view camera to match the object selected when dynamic clipping is on.
Defaults are 0.03/10000 iirc
you could probably just change the scene camera near/far to be something like this, and have the scale be something like the distance of the scene view camera to the pivot of the selected object

near = max(minNear, scale * nearFactor)
far  = max(near + margin, scale * farFactor)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants