godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.12k stars 69 forks source link

Don't constrain the 3D editor camera to a pitch angle of -90..90 degrees #1371

Open Calinou opened 4 years ago

Calinou commented 4 years ago

Note: I'm not 100% convinced doing this is a good idea. This is why I'm opening a proposal about it here, to see whether this behavior should actually be changed or left as-is.

Describe the project you are working on:

The Godot editor :slightly_smiling_face:

Describe the problem or limitation you are having in your project:

Many 3D editors such as Blender don't constrain the pitch angle when orbiting or using freelook mode. I wonder if the Godot editor should do the same.

Describe the feature / enhancement and how it helps to overcome the problem or limitation:

We can change the editor code to remove the 3D editor camera's pitch angle constraint.

Advantages:

Disadvantages:

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:

Remove this line and its equivalent in the pan code. Make sure input works as expected when the camera is upside down – the X axis should probably be inverted automatically when the pitch angle isn't between -90 and 90 degrees.

If this enhancement will not be used often, can it be worked around with a few lines of script?:

No, as this is core editor functionality.

Is there a reason why this should be core and not an add-on in the asset library?:

This is core editor functionality.

ghost commented 4 years ago

i feel like, we shouldn't allow the camera to go upside down, but you should be able to look at the ground straight down

i would allow the camera to pitch at any angle, but i just wouldn't allow it to go upside down as it would get freaky it should be pretty easy to tell when, you are looking straight down, or straight up, so it should be easy to fix

maybe, i'm not actually sure

edit


you could just make it so that the camera rotates on itself, if you want to switch which side you are on (i don't know, it probably made more sense in my own mind)

Zireael07 commented 4 years ago

@RaTcHeT302: Nope, it's not easy to tell when we're upside down due to something called gimbal lock. We'd have to use quaternions... Other than that, your idea is very good.