summaryrefslogtreecommitdiff
path: root/scene/3d/camera_3d.cpp
AgeCommit message (Collapse)Author
2021-04-30Prevent setting too big or too small Collision Mask and LayerRafał Mikrut
2021-03-12Fixes small typos and grammar correctionAnshul7sp1
2021-02-18Refactor Process Modereduz
Implements https://github.com/godotengine/godot-proposals/issues/1835#issuecomment-727186192 * PauseMode is now ProcessMode, containing the following states: ``` PROCESS_MODE_INHERIT, // same as parent node PROCESS_MODE_NORMAL, // process only if not paused PROCESS_MODE_PAUSE_ONLY, // process only if paused PROCESS_MODE_ALWAYS, // process always PROCESS_MODE_DISABLED, // never process ``` * NOTIFICATION_PAUSED and NOTIFICATION_UNPAUSED are received effectively when the node is paused and unpaused (not any longer when pause mode is set in SceneTree). * Renamed some nodes that used ProcessMode/process_mode to specify a callback type to ProcessCallback to avoid clashes.
2021-02-10Removed _change_notifyreduz
-For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap. -For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed() -Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
2021-02-07Initialize class variables with default values in scene/ [1/2]Rafał Mikrut
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-12-20Rename Camera3D near and far getters and settersMarcel Admiraal
Renames: - get_znear() -> get_near() - set_znear() -> set_near() - get_zfar() -> get_far() - set_zfar() -> set_far()
2020-12-19Increase the default Camera Zfar to 4000Hugo Locurcio
This makes it possible to view far away objects without having to tweak any settings. This results in a more usable editor when working on large-scale levels. This change should have no impact on performance, but note that Z-fighting will be visible at a distance. This can be made less visible by increasing the Znear value (however, doing so will cause nearby surfaces to disappear). This change was also applied to the editor, but it will only apply to newly created scenes. This also changes the default camera settings in the glTF importer to match the Camera node's defaults.
2020-11-17Lowering the Minimum Unit at Shape3D and CamerasTokage
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-07-01Environment: Refactor code for readability + moreRémi Verschelde
- Makes all boolean setters/getters consistent. - Fixes bug where `glow_hdr_bleed_scale` was not used. - Split CameraEffects to their own source file. - Reorder all Environment method and properties declarations, definitions and bindings to be consistent with each other and with the order of property bindings. - Bind missing enum values added with SDFGI. - Remove unused SDFGI enhance_ssr boolean. - Sync doc changes after SDFGI merge and other misc changes.
2020-06-27Call Node3D::get_global_transform and Vector3::dot only once within ↵Adam Reichold
Camera3D::is_position_behind to avoid redundant work.
2020-06-21Check for motion in cast_motion() before doing Bullet convexSweepTest().Marcel Admiraal
Also ensure that default closest_safe and closest_unsafe values are defined in cast_motion() and before cast_motion() is called.
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
2020-05-10Revert "Renamed plane's d to distance"Rémi Verschelde
This reverts commit ec7b481170dcd6a7b4cf0e6c1221e204ff7945f3. This was wrong, `d` is not a distance but the `d` constant in the parametric equation `ax + by + cz = d` describing the plane.
2020-05-10Renamed plane's d to distanceMarcus Elg
2020-05-07Merge pull request #38226 from Calinou/increase-camera3d-fovRémi Verschelde
Increase the default Camera3D field of view to 75
2020-05-01Increase the default Camera3D field of view to 75Hugo Locurcio
A vertical FOV of 75 degrees is roughly equivalent to a 91 degree horizontal FOV on a 4:3 display (~107.51 degrees on 16:9), which is close to the typical default FOV used in PC games. Note that this doesn't apply to the in-editor camera which keeps its FOV to 70. This is because it doesn't display in fullscreen; its viewport only displays in the center of the editor (roughly). This means the viewport won't cover the viewer's eyes as much. Therefore, the editor camera FOV should be slightly lower to account for this. Since this changes the default value, this may break existing projects slightly. For the record, this was already done in https://github.com/godotengine/godot-demo-projects/pull/260 for the official demo projects.
2020-04-18Change non-existent World to World3Dqarmin
2020-04-02Replace more occurrences of NULL with nullptrRémi Verschelde
2020-04-02Replace NULL with nullptrlupoDharkael
2020-03-27Renaming of servers for coherency.Juan Linietsky
VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
2020-03-27Rename more 2D and 3D nodes to follow conventionRémi Verschelde
Rename editor plugins to match the new node names.
2020-03-27Renamed 2D and 3D nodes to make their types explicitJuan Linietsky
Fixes #30736.