summaryrefslogtreecommitdiffstats
path: root/doc/classes/PhysicsServer2D.xml
Commit message (Collapse)AuthorAgeFilesLines
* fix: replace "Godot" to "Redot"Muhannad Elbolaky2024-10-151-3/+3
| | | | Trying to change "Godot" to "Redot" in the doc while acknowledging the reference to previous Godot versions like Godot 3.X.
* Bind `PhysicsServer*D::body_set_state_sync_callback`Mikael Hermansson2024-07-231-0/+11
|
* Merge pull request #91596 from TheKiromen/improve-body-create-documentationRémi Verschelde2024-05-061-1/+2
|\ | | | | | | Update `body_create` description in PhysicsServer2D/3D
| * Update body_create description in PhysicsServer2D/3DDominik Kruczek2024-05-061-1/+2
| |
* | Update area_create description in PhysicsServer2D/3D to clear up possible ↵Dominik Kruczek2024-05-051-1/+2
|/ | | | confusions
* Fix force integration documentationRicardo Buring2024-03-161-7/+9
|
* Validate `code` tags for class and member referencesYuri Sizov2023-10-031-8/+8
| | | | | | | | This commit also adds means to manually disable warnings in `code` tags where it's a false positive with the new `skip-lint` attribute. Warnings are now enabled on CI to prevent future errors.
* Update PinJoint2D API with angle limits and motor speedDragos Daian2023-09-261-0/+32
| | | | | | add enabled methods for motor and angular limits use correct name to get joint update copyright
* Doctool: Remove version attribute from XML headerRémi Verschelde2023-07-061-1/+1
| | | | | | We don't use that info for anything, and it generates unnecessary diffs every time we bump the minor version (and CI failures if we forget to sync some files from opt-in modules (mono, text_server_fb).
* Bump version to 4.2-devRémi Verschelde2023-07-051-1/+1
| | | | Keep on waitin'
* Ensure `RID`, `Callable`, and `Signal` are stored as stringsNinni Pipping2023-06-221-4/+4
| | | | | Prevents parser errors in `.tscn` and `.tres` files where the assignment would otherwise be empty.
* Documentation: Unify deprecationsDanil Alexeev2023-06-071-1/+1
|
* Overhaul the top sections of the class reference (Physics classes)VolTer2023-05-201-4/+4
|
* Validate code tags in documentation for potential paramsYuri Sizov2023-04-261-1/+1
| | | | | | | Adds a check to make_rst to look for matches between the text inside of the [code][/code] tag and known param identifiers. Fixes most of what was revealed.
* Bump version to 4.1-devRémi Verschelde2023-03-011-1/+1
| | | | Can't stop, won't stop, they said, huh?
* Fill and fix PhysicsServer2D documentationRicardo Buring2023-02-101-137/+193
| | | | | | | Fixes incorrect descriptions, adds more detail, and fills in missing descriptions. Also adds a physics object glossary at the beginning. Default values of body/area/joint parameters are now documented (based on the values in Godot Physics), to aid GDExtension developers.
* Replace "dampen" with "damp", "attenuate" in class docsquinnyo2023-02-081-4/+4
|
* Replace Area gravity point distance scale with unit distanceAaron Franke2023-01-291-2/+3
|
* Remove deprecated AREA_PARAM_GRAVITY_POINT_ATTENUATIONAaron Franke2023-01-291-8/+5
|
* Merge pull request #70708 from rburing/bind_pin_joint_set_param_2dRémi Verschelde2023-01-031-0/+17
|\ | | | | | | Bind setter and getter for pin joint parameters in `PhysicsServer2D`
| * Bind setter and getter for pin joint parameters in PhysicsServer2DRicardo Buring2022-12-291-0/+17
| |
* | Bind methods related to disabling collision between joint bodiesMikael Hermansson2022-12-231-0/+15
|/
* Add `area_get_collision_layer` and `area_get_collision_mask`Mansur Isaev2022-09-251-0/+14
|
* 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.
* Restore RigidBody2/3D, SoftBody names in physicsfabriceci2022-08-261-4/+4
|
* Merge pull request #64343 from TokageItLab/priority-phRémi Verschelde2022-08-221-0/+15
|\
| * Add collision weight to PhysicsBody for penetrations must be avoidedSilc Renew2022-08-181-0/+15
| | | | | | | | Co-authored-by: Juan Linietsky <reduzio@gmail.com>
* | [doc] Fix grammar in class docs: amount vs. numberAndy Maloney2022-08-171-2/+2
|/ | | | | | Number is used for things that can be counted (discrete items - think "integer" in this context). Also fixes a couple of awkward phrases.
* [doc] Use "param" instead of "code" to refer to parameters (4)Andy Maloney2022-08-111-5/+5
|
* Rename the argument tag to param in XML documentationYuri Sizov2022-08-081-194/+194
|
* Add an XML schema for documentationHugo Locurcio2022-02-151-1/+1
| | | | | | | | This makes it easier to spot syntax errors when editing the class reference. The schema is referenced locally so validation can still work offline. Each class XML's schema conformance is also checked on GitHub Actions.
* Improve RigidDynamicBody force and torque APIPouleyKetchoupp2021-12-101-10/+82
| | | | | | | | | | | | | 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.
* Add physics solver settings to project settingsPouleyKetchoupp2021-12-071-1/+1
| | | | | | | | | | | | Helps with discovery and setup of physics solver settings, in a specific project settings section for both 2D and 3D. Other changes for cleanup: -Removed unused space parameters in 3D SPACE_PARAM_BODY_ANGULAR_VELOCITY_DAMP_RATIO SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS -Added custom solver bias for Shape3D (same as Shape2D) -Improved documentation for solver settings
* Update space parameters in 2D and 3DPouleyKetchoupp2021-12-031-12/+11
| | | | | | | | | | | 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-25/+19
|\ | | | | Separate space override modes for gravity/damping in Area
| * Separate space override modes for gravity/damping in AreaPouleyKetchoupp2021-11-091-25/+19
| | | | | | | | Also make inspector clearer for gravity point properties.
* | Fix errors in CharacterBody when floor is destroyed or removedPouleyKetchoupp2021-11-101-1/+1
|/ | | | | | | | | | | | In all physics servers, body_get_direct_state() now silently returns nullptr when the body has been already freed or is removed from space, so the client code can detect this state and invalidate the body rid. In 2D, there is no change in behavior (just no more errors). In 3D, the Bullet server returned a valid direct body state when the body was removed from the physics space, but in this case it didn't make sense to use the information from the body state.
* Expose local center of mass in physics serversPouleyKetchoupp2021-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | 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 `Callable` in Area monitor callbackrafallus2021-11-011-4/+2
|
* Improved RigidDynamicBody linear/angular damping overridePouleyKetchoupp2021-10-251-3/+15
| | | | | | | | | 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).
* Script interface improvements for test body motionPouleyKetchoupp2021-10-041-8/+4
| | | | | | | | | -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)
* Remove shape metadata from 2D physics serverPouleyKetchoupp2021-09-301-17/+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 #52754 from nekomatata/dynamic-body-modesCamille Mohr-Daurat2021-09-281-2/+2
|\ | | | | Clarify RigidDynamicBody modes
| * Clarify RigidDynamicBody modesPouleyKetchoupp2021-09-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Improved logic for CharacterBody collision recovery depthPouleyKetchoupp2021-09-271-2/+0
|/ | | | | | | | | | | | | | | | Allows 2D character controller to work without applying gravity when touching the ground (also more safely in 3D), and collision detection is more flexible with different safe margin values. Character body motion changes in 2D and 3D: -Recovery only for depth > min contact depth to help with collision detection consistency (rest info could be lost if recovery was too much) -Adaptive min contact depth (based on margin) instead of space parameter Extra CharacterBody changes: -2D: apply changes made in 3D for stop on slope and floor snap that help fixing some jittering cases -3D: fix minor inconsistencies in stop on slope and floor snap logic
* Rename WorldMarginShape to WorldBoundaryShapePouleyKetchoupp2021-09-141-3/+3
|
* Proper support for custom mass properties in 2D/3D physics bodiesPouleyKetchoupp2021-09-061-6/+16
| | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | 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-0/+3
|\ | | | | Clean physics direct body state usage in 2D and 3D physics
| * Clean physics direct body state usage in 2D and 3D physicsPouleyKetchoupp2021-08-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a C++ callback instead of Callable for synchronizing physics nodes' state with physics servers. Remove usage of PhysicsDirectBodyState in physics nodes when not necessary. Store PhysicsDirectBodyState for bodies individually instead of a singleton to avoid issues when accessing direct body state for multiple bodies. PhysicsDirectBodyState is initialized only when needed, so it doesn't have to be created when using the physics server directly. Move PhysicsDirectBodyState2D and PhysicsDirectBodyState3D to separate cpp files.