summaryrefslogtreecommitdiff
path: root/scene/2d/area_2d.cpp
AgeCommit message (Collapse)Author
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-11-09Separate space override modes for gravity/damping in AreaPouleyKetchoupp
Also make inspector clearer for gravity point properties.
2021-11-01Use `Callable` in Area monitor callbackrafallus
2021-10-14Merge pull request #53054 from MaxLap/doc_shape_signalsCamille Mohr-Daurat
Improve area/body_shape_entered/exited signals parameter names and doc
2021-10-14Improve area/body_shape_entered/exited signals parameter names and docMaxime Lapointe
Fix some typoed names from the doc Add _index to "index" parameters of *_shape_* signals, this is both in doc and in the template. This makes the code, signature and doc easier to understand Add method to get Node from the _index params of those signals. This was not as easy to find as one would expect. Putting this information where it is needed will help.
2021-09-30Use range iterators for `Map`Lightning_A
2021-08-13Fix some unnecessary includesAaron Franke
2021-06-30Fix editor suffixes and degrees conversionreduz
* Functions to convert to/from degrees are all gone. Conversion is done by the editor. * Use PROPERTY_HINT_ANGLE instead of PROPERTY_HINT_RANGE to edit radian angles in degrees. * Added possibility to add suffixes to range properties, use "min,max[,step][,suffix:<something>]" example "0,100,1,suffix:m" * In general, can add suffixes for EditorSpinSlider Not covered by this PR, will have to be addressed by future ones: * Ability to switch radians/degrees in the inspector for angle properties (if actually wanted). * Animations previously made will most likely break, need to add a way to make old ones compatible. * Only added a "px" suffix to 2D position and a "m" one to 3D position, someone needs to go through the rest of the engine and add all remaining suffixes. * Likely also need to track down usage of EditorSpinSlider outside properties to add suffixes to it too.
2021-05-18Merge pull request #42742 from madmiraal/fix-12215Rémi Verschelde
Return RID instead of Object id in area-body_shape_entered-exited signals.
2021-05-18Area: Uncap the range for gravity and change the slider hintsAaron Franke
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-04-20Move collision layer and mask into CollisionObject.Marcel Admiraal
2021-04-18Put physics override parameters in their own group and document that areas ↵Lightning_A
can be used to influence audio
2021-03-06Return RID instead of Object id in area-body_shape_entered-exited signals.Marcel Admiraal
2021-02-24Use a more specific type for Area2D/3D body signalsAaron Franke
2021-02-07Initialize class variables with default values in scene/ [1/2]Rafał Mikrut
2021-01-09Rename the final parameter of area_shape_entered-exited local_shape.Marcel Admiraal
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-10-02Remove area or body from map before emitting signals.Marcel Admiraal
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-21Add proper type to most public API uses of ArrayJuan Linietsky
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-02-28Signals: Manually port most of remaining connect_compat usesRémi Verschelde
It's tedious work... Some can't be ported as they depend on private or protected methods of different classes, which is not supported by callable_mp (even if it's a class inherited by the current one).
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-02-21Added StringName as a variant type.Juan Linietsky
Also changed all relevant properties defined manually to StringName.
2020-02-20Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky
objects and made them default.
2020-02-12ObjectID converted to a structure, fixes many bugs where used incorrectly as ↵Juan Linietsky
32 bits.
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-09-25Added some obvious errors explanationsqarmin
2019-08-09Remove ERR_EXPLAIN from scene/* codeTomasz Chabora
2019-07-31Tweak Area and PhysicsBody damping setting hints for consistencyHugo Locurcio
This partially addresses #19182.
2019-06-24Area2D: Fix argument type of body_* signalsRémi Verschelde
Those signals receive either a PhysicsBody2D or a TileMap object, and what the emitting method checks internally is only that the object is a Node. In theory any Node could go through these signals if they talk directly to the PhysicsServer2D. Also updated docs. Fixes #27076. Might need further (compat breaking) improvement as this API is a bit confusing, cf. #24739.
2019-04-15Removed unnecessary error from _area_inoutCatThingy
The error was previously removed from _body_inout for the same reason. Fixes #28022.
2019-03-02Make query checks less agressive, fixes #24694Juan Linietsky
2019-02-22Check that area is inside tree besides checking that queries are flushed, ↵Juan Linietsky
fixes #26148
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-11-28Removed error that should not be an error, fixes #21088Juan Linietsky
2018-11-16-Make sure monitorable cant be flipped while flushing queries, fixes #17330Juan Linietsky
-Also added set_deferred, this was missing.
2018-11-08-Moved EditorDefaultValue to ClassDB, made it coreJuan Linietsky
-Removed one and zero hints for properties, replaced by default value
2018-05-16Allow editing of some unbound properties when hinted (or no range hinted)Juan Linietsky
2018-02-07Update an outdated method name in error messageronroniv
set_enable_monitoring -> set_monitoring
2018-01-12Renamed tree_exited to tree_exiting. tree_exited is now used for actual out ↵Juan Linietsky
of tree notification. Updated doc accordingly.
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-12-07Style: Apply new clang-format 5.0 style to all filesRémi Verschelde
2017-09-22Changed get_audio_bus and set functions to get_audio_bus_name and setMarcelo Paez
and edited docs for Area2D due to renaming o get_audio_bus and set_audio_bus
2017-09-11Updated Area2D docs and added enum constants to scriptingWill Nations