summaryrefslogtreecommitdiffstats
path: root/servers/physics_server_2d.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
|
* Rebrand preambles to RedotSpartan3222024-10-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit e8542b06acca3c1bdeee4b528411771f0819f084) Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* Bind `PhysicsServer*D::body_set_state_sync_callback`Mikael Hermansson2024-07-231-0/+2
|
* Update PinJoint2D API with angle limits and motor speedDragos Daian2023-09-261-0/+9
| | | | | | add enabled methods for motor and angular limits use correct name to get joint update copyright
* Fix missing clear for some `set_exclude*` query parameter methodsA Thousand Ships2023-09-211-0/+2
|
* Change the "Physics Engine" project settings to prompt a restartMikael Hermansson2023-06-041-0/+1
|
* PhysicsDirectBodyState2D: add get_contact_local_velocity_at_positionRicardo Buring2023-04-141-0/+1
|
* Modify "physics/3d/solver/contact_max_allowed_penetration" precision to ↵Malcolm Nixon2023-04-051-1/+1
| | | | | | | | three significant digits, so values down to "0.001" can be specified. Updated additional 2D and 3D physics parameters based on team recommendations Co-Authored-By: Ricardo Buring <rburing@users.noreply.github.com>
* Fix collide_shape return typeRicardo Buring2023-03-231-4/+4
| | | | | Fix PhysicsDirectSpaceState3D::_collide_shape return type. Also PhysicsDirectSpaceState2D::_collide_shape.
* Create default World physics spaces on demand onlysmix82023-01-311-0/+17
| | | | Changes that the default physics spaces of World resources are only created on first use.
* Replace Area gravity point distance scale with unit distanceAaron Franke2023-01-291-1/+1
|
* Remove deprecated AREA_PARAM_GRAVITY_POINT_ATTENUATIONAaron Franke2023-01-291-1/+0
|
* Add get_contact_impulse method to PhysicsDirectBodyState2DRicardo Buring2023-01-101-0/+1
| | | | This makes it consistent with 3D.
* Merge pull request #68429 from KoBeWi/PropertySettingsRémi Verschelde2023-01-061-1/+1
|\ | | | | Add PropertyInfo overload for GLOBAL_DEF
| * Add PropertyInfo overload for GLOBAL_DEFkobewi2022-12-111-1/+1
| |
* | 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 #70708 from rburing/bind_pin_joint_set_param_2dRémi Verschelde2023-01-031-0/+3
|\ \ | | | | | | | | | Bind setter and getter for pin joint parameters in `PhysicsServer2D`
| * | Bind setter and getter for pin joint parameters in PhysicsServer2DRicardo Buring2022-12-291-0/+3
| |/
* / Bind methods related to disabling collision between joint bodiesMikael Hermansson2022-12-231-0/+3
|/
* Update remaining physics exclude parameters to use TypedArrayRicardo Buring2022-11-231-3/+3
| | | | Also update the documentation to refer to the get_rid() method.
* Add `area_get_collision_layer` and `area_get_collision_mask`Mansur Isaev2022-09-251-0/+3
|
* Expose registration of physics servers to GDExtensionRicardo Buring2022-09-071-8/+31
| | | | This exposes PhysicsServer2DManager and PhysicsServer3DManager.
* Merge pull request #65321 from rburing/physics_server_2d_extensionRémi Verschelde2022-09-051-0/+2
|\ | | | | Create GDExtension classes for PhysicsServer2D
| * Create GDExtension classes for PhysicsServer2DRicardo Buring2022-09-041-0/+2
| | | | | | | | | | This allows a 2D physics server created entirely from GDExtension. Based on the structure of PhysicsServer3DExtension by reduz.
* | Change Array arguments to TypedArraykobewi2022-09-011-20/+20
|/
* Restore RigidBody2/3D, SoftBody names in physicsfabriceci2022-08-261-2/+2
|
* Replace Array return types with TypedArray 2kobewi2022-08-231-15/+16
|
* Add collision weight to PhysicsBody for penetrations must be avoidedSilc Renew2022-08-181-0/+3
| | | | Co-authored-by: Juan Linietsky <reduzio@gmail.com>
* Add static methods to create RayQueryParameterskobewi2022-06-101-0/+12
|
* Use range iterators for RBSet in most casesAaron Record2022-05-191-6/+6
|
* Add dedicated macros for property name extractionHaoyu Qiu2022-05-191-1/+1
| | | | | | | * Replace case-by-case extraction with PNAME & GNAME * Fix group handling when group hint begins with property name * Exclude properties that are PROPERTY_USAGE_NO_EDITOR * Extract missing ADD_ARRAY*, ADD_SUBGROUP* macros
* Add motion parameter to toggle whether recovery is reported as a collisionRicardo Buring2022-05-181-0/+4
| | | | This makes the intent explicit in each use case.
* Replace most uses of Map by HashMapreduz2022-05-161-3/+3
| | | | | | | | | | | | * 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!
* Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>`Hugo Locurcio2022-05-031-2/+2
| | | | | | These typedefs don't save much typing compared to the full `Ref<Resource>` and `Ref<RefCounted>`, yet they sometimes introduce confusion among new contributors.
* Validate PhysicsDirectSpaceState{2,3}D::_intersect_point inputHaoyu Qiu2022-02-141-0/+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-6/+29
| | | | | | | | | | | | | 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.
* Update space parameters in 2D and 3DPouleyKetchoupp2021-12-031-3/+3
| | | | | | | | | | | Clarified space parameters for contacts and added missing ones. List of changes: -Add contact bias to space parameters -Add solver iterations to space parameters, instead of a specific physics server function -Renamed BODY_MAX_ALLOWED_PENETRATION to CONTACT_MAX_ALLOWED_PENETRATION to make it consistent with other contact parameters
* Merge pull request #54810 from nekomatata/area-separate-override-modesCamille Mohr-Daurat2021-11-111-3/+3
|\ | | | | Separate space override modes for gravity/damping in Area
| * Separate space override modes for gravity/damping in AreaPouleyKetchoupp2021-11-091-3/+3
| | | | | | | | Also make inspector clearer for gravity point properties.
* | Add raycast options to hit when starting inside / hit back facesPouleyKetchoupp2021-11-101-0/+4
|/ | | | | Makes the results consistent for all shape types with options to set the desired behavior.
* Merge pull request #54134 from nekomatata/body-center-of-mass-localCamille Mohr-Daurat2021-11-081-0/+2
|\ | | | | Expose local center of mass in physics servers
| * Expose local center of mass in physics serversPouleyKetchoupp2021-11-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Center of mass in body's local space is more useful than the transformed one in some cases, like drawing its position for debug. It's especially useful to get the generated local center of mass when in auto mode (by default). Physics Server BODY_PARAM_CENTER_OF_MASS: Now always returns the local center of mass, instead of setting a local center of mass and getting a transformed one. This causes compatibility breaking, but it makes more sense for the parameter to be consistent between getter and setter. Direct Body State: There are now two properties, because both of them can be useful in different situations. center_of_mass: relative position in global coordinates (same as before) center_of_mass_local: position in local coordinates
* | Use parameter classes instead of arguments for all physics queriesPouleyKetchoupp2021-11-041-120/+137
|/ | | | | | | | Same as what is already done for shape queries, applied to point and ray queries. Easier to document and more flexible to add more parameters. Also expose intersect_point method to script in 3D. Remove intersect_point_on_canvas in 2D, replaced with a parameter.
* Use `Callable` in Area monitor callbackrafallus2021-11-011-2/+2
|
* Improved RigidDynamicBody linear/angular damping overridePouleyKetchoupp2021-10-251-0/+5
| | | | | | | | | 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 missing argument names in bindingsRémi Verschelde2021-10-091-6/+6
| | | | | | While at it, tweak some boolean setters to use `p_enabled` for the bool. Also renames `draw_minimap()` to `set_draw_minimap()`.
* Fix physics glitch with TileMap moving platformsPouleyKetchoupp2021-10-041-0/+24
| | | | | | | | | 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-22/+56
| | | | | | | | | -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 #42364 from madmiraal/fix-39887Rémi Verschelde2021-10-031-1/+1
|\