summaryrefslogtreecommitdiffstats
path: root/scene/3d/area_3d.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Split monolithic physics class filessmix82024-02-271-822/+0
| | | | Splits monolithic physics class files.
* Prevent mapping areas with invalid IDs for `Area2D/3D`A Thousand Ships2023-12-181-2/+32
| | | | | This occurs when areas are created directly from the servers, and no instance is linked.
* Clear monitoring in `Area*` when its space changes to invalid风青山2023-12-151-4/+6
| | | | | | So that it can work properly when the space changes to valid again. Change `space` in advance to prevent disabled areas from being queried again.
* Use StringName consistently to refer to the Master audio bus nameHugo Locurcio2023-08-071-2/+2
|
* Use `get_node_or_null` when null checks are presentNinni Pipping2023-06-101-3/+5
| | | | Avoids duplicate or unnecessary errors
* Use NULL instead of COND checks when appropriateNinni Pipping2023-06-101-4/+4
| | | | Restricted to scene
* Make Area physics priority consistently int and allow negative numbersAaron Franke2023-04-181-3/+3
|
* Replace Area gravity point distance scale with unit distanceAaron Franke2023-01-291-8/+8
|
* Error when removing a phycics node during a physics callbackJuan Linietsky2023-01-071-0/+4
| | | | | | | | * This behavior is not allowed, the error text suggests using call_deferred(). * Added a check in Node::remove_child to prevent future crashes of this type. * Fixed a performance regression introduced by #36244. Fixes #63718, probably other crashes too.
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | 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".
* Rename remaining "*_enable" to "*_enabled"Micky2022-09-211-6/+6
| | | | | | | | | | | | | | | | | | Material.`proximity_fade_enable` -> `proximity_fade_enabled` Material.`set_proximity_fade` -> `set_proximity_fade_enabled` (Material.`is_proximity_fade_enabled` is unchanged) Area3D.`reverb_bus_enable` -> `reverb_bus_enabled` (`set_use_reverb_bus` & `is_using_reverb_bus` are unchanged) RDPipelineRasterizationState: `depth_bias_enable` -> `depth_bias_enabled` `set_depth_bias_enable` -> `set_depth_bias_enabled` `get_depth_bias_enable` -> `get_depth_bias_enabled` Bonus: Area3D.`set_reverb_bus` -> `set_reverb_bus_name` Area3D.`get_reverb_bus` -> `set_get_reverb_bus_name`
* Implement Area.has_overlapping_*VolTer2022-09-101-0/+13
|
* Rename `or_lesser` range property hint to `or_less`Hugo Locurcio2022-09-021-1/+1
| | | | | | | "less" should be used for quantity, rather than "lesser". Existing scripts that use `or_lesser` in `_get_property_list()` will need to be updated to account for this change.
* fixed and optimized Area2/3D get_overlapping_bodies/areasVoid2022-09-021-13/+12
| | | | fixed a type and made it so area3d get_overlapping_x is similar to its counterpart func in area2d so that it uses TypedArray instead of Array and ERR_FAIL_COND_V_MSG instead of no message, also minimized array resize calls
* Make `_validate_property` a multilevel methodYuri Sizov2022-08-221-15/+13
|
* Remove unintentional PROPERTY_USAGE_INTERNALRedMser2022-08-181-5/+5
| | | | | The flag only matters for property definition, but was also used in _validate_property a lot.
* Remove Signal connect bindsJuan Linietsky2022-07-291-4/+4
| | | | | Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind(). Changed all uses of it to Callable.bind()
* Add suffixes to all nodes and resourcesFireForge2022-06-111-1/+1
|
* Use suffixes for units in nodes and resourcesAaron Franke2022-05-191-1/+1
|
* Replace most uses of Map by HashMapreduz2022-05-161-52/+52
| | | | | | | | | | | | * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
* Rename Basis get_axis to get_column, remove redundant methodsAaron Franke2022-05-031-1/+1
|
* Use `switch` consistently in `_notification` (`scene` folder)Rémi Verschelde2022-02-151-4/+8
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Separate space override modes for gravity/damping in AreaPouleyKetchoupp2021-11-091-23/+90
| | | | Also make inspector clearer for gravity point properties.
* Use `Callable` in Area monitor callbackrafallus2021-11-011-7/+4
|
* Refactored Node3D rotation modesreduz2021-10-251-0/+2
| | | | | | | | | * Made the Basis euler orders indexed via enum. * Node3D has a new rotation_order property to choose Euler rotation order. * Node3D has also a rotation_mode property to choose between Euler, Quaternion and Basis Exposing these modes as well as the order makes Godot a lot friendlier for animators, which can choose the best way to interpolate rotations. The new *Basis* mode makes the (exposed) transform property obsolete, so it was removed (can still be accessed by code of course).
* Merge pull request #53054 from MaxLap/doc_shape_signalsCamille Mohr-Daurat2021-10-141-4/+4
|\ | | | | Improve area/body_shape_entered/exited signals parameter names and doc
| * Improve area/body_shape_entered/exited signals parameter names and docMaxime Lapointe2021-10-141-4/+4
| | | | | | | | | | | | 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.
* | Use range iterators for `Map`Lightning_A2021-09-301-14/+14
|/
* Enabled area-specific wind forcesJeffrey Cochran2021-08-231-0/+69
|
* Fix some unnecessary includesAaron Franke2021-08-131-1/+0
|
* Fix editor suffixes and degrees conversionreduz2021-06-301-1/+1
| | | | | | | | | | | | | * 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.
* Merge pull request #42742 from madmiraal/fix-12215Rémi Verschelde2021-05-181-14/+16
|\ | | | | Return RID instead of Object id in area-body_shape_entered-exited signals.
| * Return RID instead of Object id in area-body_shape_entered-exited signals.Marcel Admiraal2021-03-061-14/+16
| |
* | Area: Uncap the range for gravity and change the slider hintsAaron Franke2021-05-181-1/+1
| |
* | Move collision layer and mask into CollisionObject.Marcel Admiraal2021-04-201-62/+0
| |
* | Put physics override parameters in their own group and document that areas ↵Lightning_A2021-04-181-3/+8
| | | | | | | | can be used to influence audio
* | Fixes small typos and grammar correctionAnshul7sp12021-03-121-2/+2
|/
* Use a more specific type for Area2D/3D body signalsAaron Franke2021-02-241-4/+4
|
* Initialize class variables with default values in scene/ [1/2]Rafał Mikrut2021-02-071-19/+0
|
* Rename the final parameter of area_shape_entered-exited local_shape.Marcel Admiraal2021-01-091-4/+4
|
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | 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 🎆
* Rename Area3D audio_bus_name getter and setterMarcel Admiraal2020-12-101-5/+5
|
* Remove area or body from map before emitting signals.Marcel Admiraal2020-10-021-20/+8
|
* Ensure node's area tree signals are disconnected when clearing monitoring,Marcel Admiraal2020-08-231-6/+6
| | | | even if nodes are no longer in the tree.
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-20/+38
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+15
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-70/+0
| | | | | | | | | | | | | | 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.
* Add proper type to most public API uses of ArrayJuan Linietsky2020-04-211-2/+2
|
* Replace NULL with nullptrlupoDharkael2020-04-021-2/+2
|