summaryrefslogtreecommitdiff
path: root/scene/resources/world_2d.cpp
AgeCommit message (Collapse)Author
2023-01-06Merge pull request #68429 from KoBeWi/PropertySettingsRémi Verschelde
Add PropertyInfo overload for GLOBAL_DEF
2023-01-05One Copyright Update to rule them allRémi Verschelde
As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
2022-12-29Add safety-checks before some servers `free()`Adam Scott
2022-12-11Add PropertyInfo overload for GLOBAL_DEFkobewi
2022-08-26Added node for Navigation linksJosh Jones
2022-06-12Mark some common project settings as basicHugo Locurcio
2022-01-28Improve Navigation2D default settings, see #56852Pawel Lampe
This commit reduces `cell_size` and `edge_connection_margin` default values so that `Navigation2D` behaves more like in Godot <= `3.4` by default.
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-06-17Add PROPERTY_USAGE_NONE and use itAaron Franke
2021-06-16Rename VisibilityNotifierXD to VisibleOnScreenNotifierXDreduz
* Renames for 2D and 3D * Class name was confusing, given both 2D and 3D have a "visible" property that is unrelated to actual on-screen visibility. * New name makes it clear that this is about visibility on screen.
2021-06-16Refactor VisibilityNotifierreduz
* Works from RenderinServer * Accurately tells when on or off-scren, its no longer approximate. * VisibilityEnabler also simplified to use the process mode instead.
2021-05-05Increase the default 2D gravity to 980.0Hugo Locurcio
This makes 2D RigidBody physics feel less floaty out of the box. This closes https://github.com/godotengine/godot-proposals/issues/98.
2021-03-15Allow Navigation to be more flexibleGilles Roudière
2021-03-10Remove Navigation2D/3D nodes, and move the navigation map to the world resourceGilles Roudière
2021-02-09Initialize class variables with default values in scene/ [2/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-28Rename empty() to is_empty()Marcel Admiraal
2020-11-09Variant: Rename Type::_RID to Type::RIDRémi Verschelde
The underscore prefix was used to avoid the conflict between the `RID` class name and the matching enum value in `Variant::Type`. This can be fixed differently by prefixing uses of the `RID` class in `Variant` with the scope resolution operator, as done already for `AABB`.
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-13Avoid overflow when calculating visible_cellsPatrick Dawson
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-04-28Expose the cell_size affecting VisibilityNotifier2D precisionBojidar Marinov
Refs: #4803
2020-03-28More server renames for consistency after #37361Rémi Verschelde
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-26Added a Window node, and made it the scene root.Juan Linietsky
Still a lot of work to do.
2020-02-25Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky
- Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-10-0732294: Changed the default_angular_damp value to a float.devbox
32294: Added hints for both 2d/3d linear/angular. 32294: Added hints for both 2d/3d linear/angular.
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-10-01Fix mismatched class/struct definition warnings [-Wmismatched-tags]Rémi Verschelde
Fixes the following Clang 7 warnings: ``` core/object.cpp:44:1: warning: '_ObjectDebugLock' defined as a struct here but previously declared as a class [-Wmismatched-tags] core/variant_call.cpp:43:1: warning: '_VariantCall' defined as a struct here but previously declared as a class [-Wmismatched-tags] drivers/gles3/rasterizer_storage_gles3.h:765:2: warning: 'MultiMesh' defined as a struct here but previously declared as a class [-Wmismatched-tags] editor/editor_node.h:794:1: warning: 'EditorProgress' defined as a struct here but previously declared as a class [-Wmismatched-tags] modules/bullet/rigid_body_bullet.h:230:17: warning: class 'KinematicUtilities' was previously declared as a struct [-Wmismatched-tags] modules/bullet/space_bullet.h:60:1: warning: class 'btSoftBodyWorldInfo' was previously declared as a struct [-Wmismatched-tags] scene/resources/world_2d.cpp:40:1: warning: 'SpatialIndexer2D' defined as a struct here but previously declared as a class [-Wmismatched-tags] scene/resources/world.cpp:39:1: warning: 'SpatialIndexer' defined as a struct here but previously declared as a class [-Wmismatched-tags] servers/audio/reverb_sw.cpp:60:1: warning: 'ReverbParamsSW' defined as a struct here but previously declared as a class [-Wmismatched-tags] thirdparty/bullet/BulletSoftBody/btSoftBody.h:43:1: warning: 'btSoftBodyWorldInfo' defined as a struct here but previously declared as a class [-Wmismatched-tags] ```
2018-09-12Make core/ includes absolute, remove subfolders from include pathRémi Verschelde
This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
2018-01-12Bind many more properties to scriptsBojidar Marinov
Notable potentially breaking changes: - PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL - Some properties were renamed, and sometimes even shadowed by new ones - New getter methods (some virtual) were added
2018-01-05Add missing copyright headers and fix formattingRémi Verschelde
Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
2018-01-01Update copyright statements to 2018Rémi Verschelde
Happy new year to the wonderful Godot community!
2017-08-27Use HTTPS URL for Godot's website in the headersRémi Verschelde
2017-08-10Removes type information from method bindsIgnacio Etcheverry
2017-07-19-Renamed GlobalConfig to ProjectSettings, makes more sense.Juan Linietsky
-Added system for feature overrides, it's pretty cool :)
2017-07-05Use the gravity constant to calculate weightsJohan Manuel
2017-06-18-Added AudioStreamPlayer2D, for 2D positional soundJuan Linietsky
-Added ability for Area2D to redirect positional sound to a specific audio bus
2017-06-04renamed all Rect2.pos to Rect2.positionalexholly
2017-04-08Add "Godot Engine contributors" copyright lineRémi Verschelde
2017-03-05A Whole New World (clang-format edition)Rémi Verschelde
I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
2017-02-21-renamed globals.h to global_config.cpp (this seems to have caused a few ↵Juan Linietsky
modified files) -.pck and .zip exporting redone, seems to be working..
2017-02-13Rename the _MD macro to D_METHODHein-Pieter van Braam
This new name also makes its purpose a little clearer This is a step towards fixing #56
2017-01-15Oops! Audio engine has vanished :DJuan Linietsky
2017-01-14no more errors related to missing GlobalConfig::Get (or so I hope)Juan Linietsky
2017-01-05-Changed most project settings in the engine, so they have major and minor ↵Juan Linietsky
categories. -Changed SectionedPropertyEditor to support this -Renamed Globals singleton to GlobalConfig, makes more sense. -Changed the logic behind persisten global settings, instead of the persist checkbox, a revert button is now available
2017-01-02ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to ↵Juan Linietsky
Variant. All usages of "type" to refer to classes were renamed to "class" ClassDB has been exposed to GDScript. OBJ_TYPE() macro is now GDCLASS()