summaryrefslogtreecommitdiffstats
path: root/scene/3d/physics_body_3d.h
Commit message (Collapse)AuthorAgeFilesLines
* Split monolithic physics class filessmix82024-02-271-797/+0
| | | | Splits monolithic physics class files.
* Revert "Update Node::get_configuration_warnings signature"Rémi Verschelde2024-02-171-1/+1
| | | | This reverts commit d3852deaa450d77edb30df2bb1c77bd7bc45befc.
* Merge pull request #88019 from mihe/wrong-contact-countRémi Verschelde2024-02-141-0/+1
|\ | | | | | | Fix `get_contact_count` sometimes being incorrect in `_process`
| * Fix contact count sometimes being incorrect in `_process`Mikael Hermansson2024-02-061-0/+1
| |
* | Update Node::get_configuration_warnings signatureRedMser2024-02-081-1/+1
|/
* Expose a method to get gravity for any physics bodyAaron Franke2024-01-301-0/+1
|
* Make CharacterBody properties publicACB2024-01-251-39/+39
|
* added state sync after call to _integrate_forcesChinmay Awale2023-08-011-0/+3
|
* Exposes the apply_floor_snap function to allow a snap to be made regardless ↵fabriceci2023-02-221-0/+1
| | | | of velocity.
* 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".
* Merge pull request #63650 from fabriceci/apply-moving-platform-angular-velocityRémi Verschelde2023-01-031-0/+2
|\ | | | | | | Allow to apply the angular velocity of a moving platform
| * Adds a method to return the angular velocity of a platformfabriceci2022-08-241-0/+2
| |
* | Revert move vector parameter name to motionHaoyu Qiu2022-11-191-2/+2
| |
* | Change return type of `get_configuration_warnings` to `PackedStringArray`Marc Gilleron2022-09-191-1/+1
| |
* | Add recovery_as_collision in move_and_collide/test_movefabriceci2022-09-171-2/+2
| |
* | Merge pull request #64367 from Mickeon/rename-var-to-strRémi Verschelde2022-08-261-2/+2
|\ \ | | | | | | Rename `str2var` to `str_to_var` and similar
| * | Rename `str2var` to `str_to_var` and similarMicky2022-08-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`
* | | Restore RigidBody2/3D, SoftBody names in physicsfabriceci2022-08-261-8/+8
|/ /
* | Shorten variable names for moving platforms in CharacterBodyfabriceci2022-08-251-14/+14
| |
* | Improves the API for monitoring contacts in RigidDynamicBodyfabriceci2022-08-241-0/+1
|/
* Replace Array return types with TypedArray 2kobewi2022-08-231-1/+1
|
* Make `_validate_property` a multilevel methodYuri Sizov2022-08-221-2/+2
|
* add get_depth() to KinematicCollision3D as same of 2DSilc Renew2022-08-101-0/+1
|
* Code quality: Fix header guards consistencyRémi Verschelde2022-07-251-1/+1
| | | | | Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
* Replace most uses of Map by HashMapreduz2022-05-161-2/+4
| | | | | | | | | | | | * 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!
* Fix 2D jitter on slight slopefabriceci2022-03-211-2/+2
|
* Add linear_velocity and angular_velocity to PhysicalBone3DMrSwedish2022-03-031-0/+14
|
* Rename motion_velocity to velocityChris Bradfield2022-02-221-3/+3
|
* Revert #53174 (applying the delta in move and collide), rename rec_vel to ↵fabriceci2022-01-261-2/+2
| | | | distance and improve the doc description
* rename free mode to floating modefabriceci2022-01-241-2/+2
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Improve RigidDynamicBody force and torque APIPouleyKetchoupp2021-12-101-4/+14
| | | | | | | | | | | | | 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.
* Improved RigidDynamicBody linear/angular damping overridePouleyKetchoupp2021-10-251-4/+36
| | | | | | | | | Damping values are now non-negative. Add new properties linear_damp_mode and angular_damp_mode to set the way RigidDynamicBody and PhysicalBone (2D & 3D) use damping values. It can now be Combine (default) to add to the default/areas, or Replace to override the value completely (current behavior).
* Fix physics glitch with TileMap moving platformsPouleyKetchoupp2021-10-041-0/+1
| | | | | | | | | Added a parameter in test_body_motion to exclude attached objects from collision, used to avoid collision with all TileMap tiles with moving platform motion instead of just the one tile the character touches. Same changes made in 3D for consistency, and handling potential similar cases.
* Script interface improvements for test body motionPouleyKetchoupp2021-10-041-13/+3
| | | | | | | | | -Physics servers test body motion use a class to hold parameters instead of multiple arguments to make it more readable and flexible since there are many options -Improved documentation for test body motion and kinematic collision -Removed read-only properties for body motion results (not handled in scripts, so they should be get_ methods only instead)
* Merge pull request #53302 from nekomatata/physics-bone-remove-editor-codeCamille Mohr-Daurat2021-10-011-2/+1
|\ | | | | Remove editor code in PhysicalBone3D
| * Remove editor code in PhysicalBone3DPouleyKetchoupp2021-10-011-2/+1
| | | | | | | | | | _set_gizmo_move_joint is only used in PhysicalBone3DEditor, so the editor plugin call can be done directly there.
* | Fix body stuck on descending platformfabriceci2021-09-301-0/+2
|/
* Remove shape metadata from 2D physics serverPouleyKetchoupp2021-09-301-2/+0
| | | | | | Shape metadata was only used to get tile information when colliding with tilemaps. It's not needed anymore since there's an API in tilemap using body ids instead.
* Merge pull request #53197 from nekomatata/fix-motion-direction-in-slopeCamille Mohr-Daurat2021-09-301-9/+11
|\ | | | | Fix motion direction in slope for CharacterBody3D
| * Fix motion direction in slope for CharacterBody3DPouleyKetchoupp2021-09-301-9/+11
| | | | | | | | | | | | | | - More accurate sliding in slopes to keep input direction correct - More accurate constant speed calculation - Renamed linear_velocity to motion_velocity for clarity - General code cleaning and simplifications
* | Merge pull request #52754 from nekomatata/dynamic-body-modesCamille Mohr-Daurat2021-09-281-13/+23
|\ \ | |/ |/| Clarify RigidDynamicBody modes
| * Clarify RigidDynamicBody modesPouleyKetchoupp2021-09-161-13/+23
| | | | | | | | | | | | | | | | | | | | | | RigidDynamicBody modes are replaced with several properties to make their usage clearer: -lock_rotation: disable body's rotation (instead of MODE_LOCKED) -freeze: no gravity or forces (instead of MODE_STATIC and MODE_KINEMATIC) -freeze_mode: Static (can be only teleported) or Kinematic (can be animated) Also renamed MODE_DYNAMIC_LOCKED to MODE_DYNAMIC_LINEAR in the physics servers.
* | Set stop on slope on by default on CharacterBody.fabriceci2021-09-281-1/+1
| |
* | Sync to physics true by default for AnimatableBodyfabriceci2021-09-281-1/+1
| |
* | Port 2D improvement to move and slide 3Dfabriceci2021-09-221-52/+136
|/ | | | Co-authored-by: Camille Mohr-Daurat <pouleyketchoup@gmail.com>
* Rename RigidBody to RigidDynamicBody and SoftBody to SoftDynamicBodyPouleyKetchoupp2021-09-161-7/+7
|
* Proper support for custom mass properties in 2D/3D physics bodiesPouleyKetchoupp2021-09-061-0/+21
| | | | | | | | | | | | Changes: -Added support for custom inertia and center of mass in 3D -Added support for custom center of mass in 2D -Calculated center of mass from shapes in 2D (same as in 3D) -Fixed mass properties calculation with disabled shapes in 2D/3D -Removed first_integration which is not used in 2D and doesn't seem to make a lot of sense (prevents omit_force_integration to work during the first frame) -Support for custom inertia on different axes for RigidBody3D
* Add AnimatableBody inherited from StaticBody for moving platformsPouleyKetchoupp2021-08-311-20/+27
| | | | | | | | | | | | | Instead of having a physics node named Static that can be either Static or Kinematic, AnimatableBody is added again as a separate node: -Inherited from StaticBody to make its usage clearer -Still separated from CharacterBody to make its usage more focused Properly implemented constant velocity for kinematic bodies in godot physics servers (induced velocity without actually moving). Also updated description for the different physics nodes to make their usage clearer.
* Merge pull request #49471 from nekomatata/body-state-sync-callbackJuan Linietsky2021-08-311-4/+6
|\ | | | | Clean physics direct body state usage in 2D and 3D physics