summaryrefslogtreecommitdiff
path: root/servers/physics_3d
AgeCommit message (Collapse)Author
2022-10-07Fix MSVC warnings, rename shadowed variables, fix uninitialized values, ↵bruvzg
change warnings=all to use /W4.
2022-10-05Merge pull request #66720 from qarmin/unintialized_memoryRémi Verschelde
Remove usage of unitialized variables
2022-10-01Remove usage of unitialized variablesRafał Mikrut
2022-09-30Fix crash when executing `PhysicsServer2D.joint_clear`Haoyu Qiu
2022-09-28Merge pull request #66568 from rburing/cylinder_support_is_deadRémi Verschelde
`GodotCylinderShape3D::get_supports`: delete dead code
2022-09-28GodotCylinderShape3D::get_supports: delete dead codeRicardo Buring
2022-09-28Fix MSVC warnings C4701 and C4703: Potentially uninitialized variable usedRémi Verschelde
2022-09-26Style: Cleanup header guards for consistencyRémi Verschelde
Fix file names for {Static,Lightmap}RaycasterEmbree.
2022-09-25Add `area_get_collision_layer` and `area_get_collision_mask`Mansur Isaev
2022-09-21Merge pull request #65828 from rburing/body_state_sync_callableRémi Verschelde
make `body_set_state_sync_callback` take a `Callable`
2022-09-19Warn users when collisions are not supportedfabriceci
2022-09-15PhysicsServer2D and PhysicsServer3D: make body_set_state_sync_callback take ↵Ricardo Buring
a Callable Prefer Callable to a C-style callback. This is helpful for GDExtension.
2022-09-02Add `is_zero_approx` methods to `Vector2`, `3`, and `4`Jonathan Nicholl
2022-08-27Fix collision solving between world boundary and motion shapeRicardo Buring
2022-08-26Merge pull request #64367 from Mickeon/rename-var-to-strRémi Verschelde
Rename `str2var` to `str_to_var` and similar
2022-08-26Rename `str2var` to `str_to_var` and similarMicky
Affects the Math class, a good chunk of the audio code, and a lot of other miscellaneous classes, too. - `var2str` -> `var_to_str` - `str2var` -> `str_to_var` - `bytes2var` -> `bytes_to_var` - `bytes2var_with_objects` -> `bytes_to_var_with_objects` - `var2bytes` -> `var_to_bytes` - `var2bytes_with_objects` -> `var_to_bytes_with_objects` - `linear2db` -> `linear_to_db` - `db2linear` -> `db_to_linear` - `deg2rad` -> `deg_to_rad` - `rad2deg` -> `rad_to_deg` - `dict2inst` -> `dict_to_inst` - `inst2dict` -> `inst_to_dict`
2022-08-26Restore RigidBody2/3D, SoftBody names in physicsfabriceci
2022-08-18Add collision weight to PhysicsBody for penetrations must be avoidedSilc Renew
Co-authored-by: Juan Linietsky <reduzio@gmail.com>
2022-08-10add get_depth() to KinematicCollision3D as same of 2DSilc Renew
2022-08-07Add area monitor callback error checkingRyan Heath
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-07-25Remove ThreadWorkPool, replace by WorkerThreadPoolJuan Linietsky
The former needs to be allocated once per usage. The later is shared for all threads, which is more efficient. It can also be better debugged.
2022-07-25Code quality: Fix header guards consistencyRémi Verschelde
Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
2022-06-20Clean up Hash Functionsreduz
Clean up and do fixes to hash functions and newly introduced murmur3 hashes in #61934 * Clean up usage of murmur3 * Fixed usages of binary murmur3 on floats (this is invalid) * Changed DJB2 to use xor (which seems to be better)
2022-05-28Add a 3D suffix to relevant physics profiler categoriesHugo Locurcio
2D physics categories already had a 2D suffix: "Physics 2D"
2022-05-25use ERR_FAIL_INDEX when preferredNathan Franke
2022-05-20Add a new HashSet templatereduz
* Intended to replace RBSet in most cases. * Optimized for iteration speed
2022-05-19Use range iterators for RBSet in most casesAaron Record
2022-05-18Add motion parameter to toggle whether recovery is reported as a collisionRicardo Buring
This makes the intent explicit in each use case.
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-03Rename Basis get_axis to get_column, remove redundant methodsAaron Franke
2022-05-02Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`Rémi Verschelde
Didn't commit all the changes where it wants to initialize a struct with `{}`. Should be reviewed in a separate PR. Option `IgnoreArrays` enabled for now to be conservative, can be disabled to see if it proposes more useful changes. Also fixed manually a handful of other missing initializations / moved some from constructors.
2022-04-06Fix some issues found by cppcheck.bruvzg
2022-04-04Zero initialize all pointer class and struct membersRémi Verschelde
This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
2022-03-23Add protective checks for invalid handle use in BVHlawnjelly
Adds DEV_ASSERTS that will halt at runtime if the BVH is misused with invalid IDs, and adds ERR_FAIL macros to prevent calling with invalid IDs. Any such misuse is a bug in the physics, but this should flag any errors quickly.
2022-03-20Raycasts hitting from inside: return collision point in global coordinatesRicardo Buring
2022-03-15Create GDExtension clases for PhysicsServer3Dreduz
* Allows creating a GDExtension based 3D Physics Server (for Bullet, PhysX, etc. support) * Some changes on native struct binding for PhysicsServer This allows a 3D Physics server created entirely from GDExtension. Once it works, the idea is to port the 2D one to it.
2022-03-06[4.x] BVH - Fix area-area collision regressionlawnjelly
Minimal approach to fixing regression whereby static areas where not detect dynamic areas.
2022-03-04Merge pull request #57630 from lawnjelly/bvh4_templated_checksRémi Verschelde
[4.x] BVH - Sync BVH with 3.x
2022-02-18In final phase of test_body_motion, move and cull AABB for body once, ↵Ricardo Buring
instead of for every shape
2022-02-16Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde
Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
2022-02-04BVH - Sync BVH with 3.xlawnjelly
Templated mask checks and generic NUM_TREES Fix leaking leaves
2022-01-27Fix triangular area calculationTechnoPorg
It's a triangle, so the area should be halved. Co-authored-by: Jeffrey Cochran <koenigcochran@gmail.com>
2022-01-20Rename or refactor macros to avoid leading underscoresOmar Polo
These are not used consistently and some can conflict with system-specific defines. While here, also delete some unused macros.
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-10Merge pull request #55736 from nekomatata/physics-apply-forcesCamille Mohr-Daurat
Improve RigidDynamicBody force and torque API
2021-12-10Merge pull request #55773 from nekomatata/fix-raycast-ccdCamille Mohr-Daurat
Fix rigid body ray cast CCD in 2D and 3D Godot Physics
2021-12-10Fix rigid body ray cast CCD in 2D and 3D Godot PhysicsPouleyKetchoupp
For 2D: Raycast CCD now works the same as in 3D, it changes the body's velocity to place it at the impact position instead of generating a contact point that causes a wrong push back. For both 2D and 3D: The raycast CCD process reads and modifies body velocities, so it needs to be moved to pre_solve() instead of setup() to be processed linearly on the main thread, otherwise multithreading can cause some CCD results to be randomly lost when multiple collisions occur.
2021-12-10Improve RigidDynamicBody force and torque APIPouleyKetchoupp
Makes the API for forces and impulses more flexible, easier to understand and harmonized between 2D and 3D. Rigid bodies now have 3 sets of methods for forces and impulses: -apply_impulse() for impulses (one-shot and time independent) -apply_force() for forces (time dependent) applied for the current step -add_constant_force() for forces that keeps being applied each step Also updated the documentation to clarify the different methods and parameters in rigid body nodes, body direct state and physics servers.
2021-12-10Merge pull request #55702 from nekomatata/physics-solver-settingsRémi Verschelde