summaryrefslogtreecommitdiff
path: root/scene/3d/collision_object_3d.cpp
AgeCommit message (Collapse)Author
2023-01-23Merge pull request #67847 from rburing/warn_non-uniformistsRémi Verschelde
Warn against using non-uniform scale for 3D physics (in the editor and class reference)
2023-01-07Error when removing a phycics node during a physics callbackJuan Linietsky
* 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.
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-11-25Use a more specific type for Mesh create_(convex|trimesh)_shapeAaron Franke
2022-11-04Add call_deferred() method to Callablekobewi
2022-10-24Warn against using non-uniform scale for 3D physicsRicardo Buring
Using non-uniform scale is known to cause many issues. Add warnings to the editor and to the class reference. Also remove the warning from SoftBody3D since it is not relevant there: it simulates in global space.
2022-10-07Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg
change warnings=all to use /W4.
2022-09-19Change return type of `get_configuration_warnings` to `PackedStringArray`Marc Gilleron
2022-08-29Expose input interaction virtual functions in CollisionObjectrafallus
2022-08-22Replace Array return types with TypedArraykobewi
2022-08-18Add collision weight to PhysicsBody for penetrations must be avoidedSilc Renew
Co-authored-by: Juan Linietsky <reduzio@gmail.com>
2022-07-30Don't move nonexistent debug shapesRicardo Buring
2022-07-29Remove Signal connect bindsJuan Linietsky
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind(). Changed all uses of it to Callable.bind()
2022-05-19Use range iterators for RBSet in most casesAaron Record
2022-05-16Merge pull request #60986 from fire-forge/capitalismRémi Verschelde
2022-05-16Replace most uses of Map by HashMapreduz
* 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!
2022-05-12Capitalize/fix some property enum hintsFireForge
2022-03-28String: Remove TTR and DTR defines in non-tools buildRémi Verschelde
This ensures we don't use TTR in runtime code, as it's specifically meant to source translations for the editor.
2022-01-25Store ObjectID instead of raw pointer for Shape OwnersHaoyu Qiu
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-11-23Rename `remove()` to `remove_at()` when removing by indexLightning_A
2021-10-27Merge pull request #54157 from bjauny/fix_potential_nullpointer_collision3dCamille Mohr-Daurat
Fix potential null pointer use, based on #54094 fix
2021-10-27Fix potential null pointer use, based on #54094 fixBastien JAUNY
2021-10-21Change the unreacheable return value of shape_find_owner()Kemikal1
Update collision_object_3d.cpp 2d modified and UINT32 usage Proper uINT32max usage Change the unreacheable return value of shape_find_owner() This reverts commit 5be98b81428169ba2dd5baecd00f1adfd9260e5c, reversing changes made to efa3ff6b9587d674cd448aca32abfd31b2c7f4d3. Change the unreacheable return value of shape_find_owner() changed from 0 to uint32_max" This reverts commit c143bb099af2666454f82428a57f2721af60a84d. Revert "changed from 0 to uint32_max"" This reverts commit 59e94edb9a32edff15f3cb881e6fc394d2aa7f65. Revert "changed from 0 to uint32_max" This reverts commit c143bb099af2666454f82428a57f2721af60a84d. Revert "Revert "changed from 0 to uint32_max""" This reverts commit c81d1073ec21b4cde4684a6dbd595f3359283bad. Revert "changed from 0 to uint32_max" This reverts commit c143bb099af2666454f82428a57f2721af60a84d. Revert "changed from 0 to uint32_max"" This reverts commit 59e94edb9a32edff15f3cb881e6fc394d2aa7f65. Revert "Revert "changed from 0 to uint32_max""" This reverts commit 6dbd972aa5c4580d4f6270ead6c66eea18617f29. Revert "changed from 0 to uint32_max"" This reverts commit 59e94edb9a32edff15f3cb881e6fc394d2aa7f65. Revert "Revert "changed from 0 to uint32_max""" This reverts commit b769ac2d11ad12f02a388d9dad17519f81d9c3b6. Revert "Revert "Revert "changed from 0 to uint32_max"""" This reverts commit 1e8d84f7ec12da01c3153e08bb8609cf2c6fd58a. Revert "Revert "Revert "Revert "changed from 0 to uint32_max""""" This reverts commit 0dc17abefad6d540c18bba7b4df9d8c04e090d0c. Change the unreacheable return value of shape_find_owner()
2021-09-30Use range iterators for `Map`Lightning_A
2021-08-23Entirely removes BIND_VMETHOD in favor of GDVIRTUALreduz
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions. * Everything else converted to GDVIRTUAL * BIND_VMETHOD is gone, always use the new syntax from now on. Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
2021-08-13Fix some unnecessary includesAaron Franke
2021-08-12Uniformize layer names, script methods and documentationPouleyKetchoupp
- Back to 1-based layer names to make it clearer in editor UI - Layer bit accessors are renamed to layer value and 1-based too - Uniform errors and documentation in render and physics - Fix a few remaining collision_layer used in place of collision_mask
2021-07-15Support for 3D sync to physicsPouleyKetchoupp
Same implementation as in 2D.
2021-06-30Add support for controlling physics nodes' behavior when disabledPouleyKetchoupp
New property disable_mode to set different behaviors: Remove: remove from physics simulation MakeStatic: change body mode to static (doesn't affect area and soft body) KeepActive: do nothing Extra change: Handle disable/enable node state with specific notifications, in order to differentiate global pause from disabled nodes.
2021-06-07Rename CollisionObject3D input_event signal position and normal parametersMarcel Admiraal
2021-06-03Rename Transform to Transform3D in coreAaron Franke
2021-05-22Fix crash on debug shapes update if CollisionObject3D is not in treetrollodel
2021-05-09Use the correct method in shape_owner_remove_shapetrollodel
2021-05-05Create CollisionObject3D debug shapes using RStrollodel
2021-04-30Prevent setting too big or too small Collision Mask and LayerRafał Mikrut
2021-04-20Move collision layer and mask into CollisionObject.Marcel Admiraal
2021-04-12Fix crashes with CollisionObject debug shapesPouleyKetchoupp
MeshInstance added as child nodes for CollisionObject debug shapes can be invalidated while deleting the collision object (child nodes are deleted first), which caused accesses to invalid memory in shape_owner_remove_shape that lead to random crashes. Also optimized accesses to shapes to avoid copy-on-write on each iteration.
2021-04-11Use Array for node configuration warningsNathan Franke
Previously, the warnings were passed as a string and delimitation of which were hard coded at each implementation.
2021-03-16Disable debug collision shapes in the editorPouleyKetchoupp
If the editor was started with --debug-collisions, 3d shapes were displayed twice, both with the gizmo and debug shapes. Some shapes could also persist after being removed due to the usage of queue_free() to destroy the debug shapes.
2021-02-24Allow CollisionObject3D to show collision shape meshestrollodel
Add an editor gizmo to CollisionObject3D. CollisionShape3D no longer shows collision shapes directly.
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-28Rename empty() to is_empty()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-18Change non-existent World to World3Dqarmin
2020-04-02Replace NULL with nullptrlupoDharkael