godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.88k stars 20.15k forks source link

Misleading docs for 3d_scaling #71144

Open warriormaster12 opened 1 year ago

warriormaster12 commented 1 year ago

Godot version

4.0-beta 10

System information

Operating System: Arch Linux KDE Plasma Version: 5.26.5 KDE Frameworks Version: 5.101.0 Qt Version: 5.15.8 Kernel Version: 5.15.86-1-lts (64-bit) Graphics Platform: Wayland Processors: 8 × AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx Memory: 14,6 GiB of RAM Graphics Processor: AMD Radeon Vega 8 Graphics Manufacturer: HP Product Name: HP Laptop

Issue description

Editing 3d-scaling options through project settings works as expected but when I want to update 3d scaling through gdscript, nothing seems to change.

Steps to reproduce

  1. create a script where you change for example ProjectSettings.set_setting("rendering/scaling_3d/scale",0.25)
  2. see result.

Minimal reproduction project

3d_scaling_forward.zip

AThousandShips commented 1 year ago

The project setting gives the default, to change at runtime use the scaling_3d_scale property on viewport

warriormaster12 commented 1 year ago

Is this the case with every single project setting? Also I got a bit confused by the docs wording

Screenshot_20230110_123312

AThousandShips commented 1 year ago

I'm not sure in general but I think it's a safe bet that if there is a property or function with the same thing changing the setting doesn't affect a running game. This is done for performance as getting a project setting isn't without a cost, and having things like signals indicating they have changed would be inefficient (and in many cases undesirable as it would affect multiple instances like different viewports in this case, where you might want different scales).

The wording is confusing however and I'm not sure exactly how it is supposed to be understood.

warriormaster12 commented 1 year ago

Should I rename or close the issue and create a new one for docs?

AThousandShips commented 1 year ago

Just rename and see what people think

KoBeWi commented 1 year ago

The doc could be maybe improved, i.e. refer to the property in the project setting description and better clarify the property description, because it's a bit misleading.