summaryrefslogtreecommitdiffstats
path: root/servers/physics_server_3d.h
Commit message (Collapse)AuthorAgeFilesLines
* GDExtension: Mark virtual function as `is_required` in `extension_api.json`David Snopek2024-09-111-3/+3
| | | | Co-authored-by: Jovan Gerodetti <jovan.gerodetti@titannano.de>
* Disable all 3D nodes, physics, and resources when compiling without 3DAaron Franke2024-03-111-0/+4
|
* Moved `face_index` field in 3D `RayResult` to end of structMikael Hermansson2023-09-261-1/+1
|
* Update PinJoint2D API with angle limits and motor speedDragos Daian2023-09-261-1/+1
| | | | | | add enabled methods for motor and angular limits use correct name to get joint update copyright
* Fix bindings of `PhysicsServer3DRenderingServerHandler`Mikael Hermansson2023-09-201-4/+4
|
* Extract ScriptInstance to simplify includesYuri Sizov2023-09-061-1/+0
| | | | | | | | | This allows to include script_instance.h directly in the generated gdvirtual.gen.inc, and remove excessive includes from the codebase. This should also allow Resource to use GDVIRTUAL macros, which wasn't possible previously due to a circular dependency.
* Add ability to get barycentric coordinates from rayPrecisionRender2023-08-021-0/+1
|
* Resolved issues with script PhysicsDirectBodyState3d contactsTim Gift2023-04-121-0/+1
| | | | Resolved a problem with PhysicsDirectBodyState3D sometimes returning incorrect contact positions and added a new get_contact_local_velocity_at_position method to compliment the existing one for the collider.
* Fix collide_shape return typeRicardo Buring2023-03-231-1/+1
| | | | | Fix PhysicsDirectSpaceState3D::_collide_shape return type. Also PhysicsDirectSpaceState2D::_collide_shape.
* Fix return type for collide_shape to use PackedVector3ArrayAnthony Cossins2023-02-121-1/+1
|
* 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
|
* Merge pull request #70281 from CherrySodaPop/get-impulse-3dRémi Verschelde2023-01-081-1/+1
|\ | | | | | | Implement collision impulse in Godot Physics 3D
| * Implement collision impulse in Godot Physics 3DLily Garcia2023-01-071-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 #63650 from fabriceci/apply-moving-platform-angular-velocityRémi Verschelde2023-01-031-0/+1
|\ \ | |/ |/| | | Allow to apply the angular velocity of a moving platform
| * Adds a method to return the angular velocity of a platformfabriceci2022-08-241-0/+1
| |
* | Rename all gdnative occurences to gdextensionGilles Roudière2022-12-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Non-exhaustive list of case-sensitive renames: GDExtension -> GDNative GDNATIVE -> GDEXTENSION gdextension -> gdnative ExtensionExtension ->Extension (for where there was GDNativeExtension) EXTENSION_EXTENSION ->EXTENSION (for where there was GDNATIVE_EXTENSION) gdnlib -> gdextension gdn_interface -> gde_interface gdni -> gde_interface
* | Update remaining physics exclude parameters to use TypedArrayRicardo Buring2022-11-231-8/+8
| | | | | | | | Also update the documentation to refer to the get_rid() method.
* | Change exclude property in `PhysicsRayQueryParameters3D` to TypedArrayRaul Santos2022-10-311-3/+3
| | | | | | | | Change type of exclude property from `Vector<RID>` to `TypedArray<RID>` which is consistent with the 2D version.
* | Merge pull request #66951 from rburing/restore_recovery_as_collisionRémi Verschelde2022-10-061-1/+1
|\ \ | | | | | | | | | Revert "Turn on recovery as collisions only for floor snapping"
| * | Revert "Turn on recovery as collisions only for floor snapping as this leads ↵Ricardo Buring2022-10-051-1/+1
| | | | | | | | | | | | | | | | | | to unwanted behaviour for other surface than the floor." This reverts commit 10395f5df2a1cac6ed83e674c084e62a88fcdde9.
* | | Add `area_get_collision_layer` and `area_get_collision_mask`Mansur Isaev2022-09-251-1/+4
|/ /
* | Merge pull request #65828 from rburing/body_state_sync_callableRémi Verschelde2022-09-211-4/+1
|\ \ | | | | | | | | | make `body_set_state_sync_callback` take a `Callable`
| * | PhysicsServer2D and PhysicsServer3D: make body_set_state_sync_callback take ↵Ricardo Buring2022-09-151-4/+1
| | | | | | | | | | | | | | | | | | a Callable Prefer Callable to a C-style callback. This is helpful for GDExtension.
* | | Turn on recovery as collisions only for floor snapping as this leads to ↵fabriceci2022-09-181-1/+1
|/ / | | | | | | unwanted behaviour for other surface than the floor.
* | Expose registration of physics servers to GDExtensionRicardo Buring2022-09-071-17/+25
| | | | | | | | This exposes PhysicsServer2DManager and PhysicsServer3DManager.
* | Restore RigidBody2/3D, SoftBody names in physicsfabriceci2022-08-261-2/+2
|/
* Replace Array return types with TypedArray 2kobewi2022-08-231-4/+6
|
* Add collision weight to PhysicsBody for penetrations must be avoidedSilc Renew2022-08-181-0/+3
| | | | Co-authored-by: Juan Linietsky <reduzio@gmail.com>
* add get_depth() to KinematicCollision3D as same of 2DSilc Renew2022-08-101-0/+1
|
* Add static methods to create RayQueryParameterskobewi2022-06-101-0/+1
|
* Add a new HashSet templatereduz2022-05-201-5/+5
| | | | | * Intended to replace RBSet in most cases. * Optimized for iteration speed
* 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-5/+5
| | | | | | | | | | | | * 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-3/+3
| | | | | | These typedefs don't save much typing compared to the full `Ref<Resource>` and `Ref<RefCounted>`, yet they sometimes introduce confusion among new contributors.
* Create GDExtension clases for PhysicsServer3Dreduz2022-03-151-7/+18
| | | | | | | * 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.
* 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-14/+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.
* Add physics solver settings to project settingsPouleyKetchoupp2021-12-071-2/+0
| | | | | | | | | | | | 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
* Merge pull request #55602 from nekomatata/improve-rigidbody-contactsRémi Verschelde2021-12-061-3/+3
|\
| * 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
* | Don't return reference on copy assignment operatorsRémi Verschelde2021-11-301-2/+1
|/ | | | | | | | | | | | | We prefer to prevent using chained assignment (`T a = b = c = T();`) as this can lead to confusing code and subtle bugs. According to https://en.wikipedia.org/wiki/Assignment_operator_(C%2B%2B), C++ allows any arbitrary return type, so this is standard compliant. This could be re-assessed if/when we have an actual need for a behavior more akin to that of the C++ STL, for now this PR simply changes a handful of cases which were inconsistent with the rest of the codebase (`void` return type was already the most common case prior to this commit).
* 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/+9
|/ | | | | 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/+1
|\ | | | | Expose local center of mass in physics servers
| * Expose local center of mass in physics serversPouleyKetchoupp2021-11-081-0/+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 parameter classes instead of arguments for all physics queriesPouleyKetchoupp2021-11-041-56/+147
|/ | | | | | | | 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
|