anthonyec / godot_little_camera_preview

🎥 Picture-in-picture style preview for both 2D and 3D cameras
MIT License
605 stars 8 forks source link

Adjust bottom left camera position in the viewport to not obstruct transforms information. #5

Open viksl opened 8 months ago

viksl commented 8 months ago

In the Image 1 below I'd like to suggest to set the bottom left view for the camera up so when you dock the camera to the left side the information at the bottom left corner (visible in the Image 1 below) can be still viewed. The transforms info is particularly useful when rotating stuff around even with camera visible as well as moving objects around.

In the Image 2 you can see that there's a status box with information about the scene/current view which is also often useful which makes the right side not the best option if you want to view the camera, the transforms info and the box at the same time. All this could be resolved by moving the left docking position several pixesl up.

Image 1: image Image 2: image

I hope me description makes sense, otherwise it's a really cool plugin ;).

EDIT: I suggest the margin's Y value to be set to 40 for both 2D and 3D.

anthonyec commented 8 months ago

Thanks for the feedback and input!

It's a little tricky because currently it's aligned with the other buttons in the viewport. So increasing it's Y margin will make it look a bit misaligned. This is the current alignment:

guidelines_2-min

But yeah, I see how this is annoying if you rely on both scene information and transform info at the same time.

Instead I'm thinking maybe the preview can fit alongside other elements in the viewport, adjusting it's position only when the information is visible:

aligned-min

What do you think? Would this work with your setup?

viksl commented 8 months ago

That's certainly nice! Though my main port wasn't that much about the right side as it was about the left side (bottom left corner shows the current operations as in my picture 1) which people check more often (you need to move precisely with snap somthing or rotate or scale, it always shows what you are doing in the that left corner ;)).

It's a great plugin and I can't wait for one day when we don't have to install plugins per project basis because this will be a staple for me, thanks!

anthonyec commented 8 months ago

Yeah without just changing the alignment, which will make it look wonky, this is hard to fix with how the plugin is currently implemented.

At the moment the camera preview sits above all viewport UI in the editor node tree. Ideally I'd like the preview to be part of the viewport node tree, where the bottom-left operation info could be shown above the camera preview.

For now, I'd recommend editing the margins in projects that use the addon. Or using the preview in the bottom-right corner once I merge this fix.