summaryrefslogtreecommitdiff
path: root/modules/bullet
AgeCommit message (Collapse)Author
2022-01-04Style: Remove inconsistently used `@author` docstringsRémi Verschelde
Each file in Godot has had multiple contributors who co-authored it over the years, and the information of who was the original person to create that file is not very relevant, especially when used so inconsistently. `git blame` is a much better way to know who initially authored or later modified a given chunk of code, and most IDEs now have good integration to show this information.
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-07Add physics solver settings to project settingsPouleyKetchoupp
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
2021-12-01Fix shape index in multiple physics queries with BulletPouleyKetchoupp
Two main changes: - Better handling of concave shapes to make sure the queries don't return a triangle index instead of shape index. Note: A concave shape within a compound shape will always return a shape index of 0 because of Bullet limitations. - Extra check for compound shapes in some queries to avoid undefined behavior, because the shape index can have an uninitialized value with convex shapes in some cases.
2021-11-23Rename `remove()` to `remove_at()` when removing by indexLightning_A
2021-11-21Fix merge conflict between #42711 and #42374Marcel Admiraal
2021-11-20Add shape data to area overlap data.Marcel Admiraal
2021-11-18Merge pull request #42374 from madmiraal/fix-32776Camille Mohr-Daurat
Trigger RigidBodyBullet space override updates when Area properties change.
2021-11-18Merge pull request #42306 from madmiraal/fix-39947Camille Mohr-Daurat
Update Bullet Area overlaps when Area properties or shapes change.
2021-11-18Merge pull request #44726 from madmiraal/fix-44644Camille Mohr-Daurat
Ignore Bullet collision contact points with distance = 0
2021-11-10Fix errors in CharacterBody when floor is destroyed or removedPouleyKetchoupp
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.
2021-11-01Use `Callable` in Area monitor callbackrafallus
2021-10-22Merge pull request #54088 from madmiraal/remove-unimplemented-methodsRémi Verschelde
2021-10-21Remove unimplemented methodsMarcel Admiraal
2021-10-21Fix SoftDynamicBody3D crash when setting disable modePouleyKetchoupp
Proper logic for changing physics state when disabled and disabled mode is changed (it was unnecessarily making calls to re-initialize physics). Extra error handling in soft body implementations to avoid crashes with invalid mesh.
2021-10-07Replace references to VisualServer in code comments with RenderingServerHugo Locurcio
VisualServer no longer exists in the `master` branch.
2021-10-04Fix crash when pinned SoftBody point is out of rangeHaoyu Qiu
2021-10-01Remove scene code in physics serversPouleyKetchoupp
Replaced Mesh with mesh RID in Godot Physics 3D and Bullet.
2021-09-30Use range iterators for `Map`Lightning_A
2021-09-30Merge pull request #53227 from Calinou/rename-getornullMax Hilbrunner
Rename RID's `getornull()` to `get_or_null()`
2021-09-30Compile bullet with threasafe switch onManuele Finocchiaro
(cherry picked from commit 6f81c213a65d288f4ae9c29472e85460dad6038b)
2021-09-30bullet: Sync with upstream 3.17Rémi Verschelde
Stop include Bullet headers using `-isystem` for GCC/Clang as it misleads SCons into not properly rebuilding all files when headers change. This means we also need to make sure Bullet builds without warning, and current version fares fairly well, there were just a couple to fix (patch included). Increase minimum version for distro packages to 2.90 (this was never released as the "next" version after 2.89 was 3.05... but that covers it too). Fixes #43868. (cherry picked from commit b7901c773c2eaff26b5c3a5342773a70571b2648)
2021-09-29Rename RID's `getornull()` to `get_or_null()`Hugo Locurcio
2021-09-28Merge pull request #52754 from nekomatata/dynamic-body-modesCamille Mohr-Daurat
Clarify RigidDynamicBody modes
2021-09-27init_kinematic_utilities from the start for kinematic bodiesBimDav
2021-09-27Reload kinematic shapes when changing PhysicsBody mode to Kinematic to ↵BimDav
prevent a crash when calling test_body_motion. Call reload_kinematic_shapes from init_kinematic_utilities as they are always called together.
2021-09-16Clarify RigidDynamicBody modesPouleyKetchoupp
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.
2021-09-14Rename WorldMarginShape to WorldBoundaryShapePouleyKetchoupp
2021-08-30Harmonize default value for collision mask in ray/shape queriesPouleyKetchoupp
The default mask for queries was 0, 0x7FFFFFFF or 0xFFFFFFFF depending on the cases. Now always using 0xFFFFFFFF (in the form of UINT32_MAX to make it clear) in order to use all layers by default.
2021-08-22Replace HTTP links with HTTPS for sites with HTTPS versionsAaron Franke
2021-08-18Fixes in Bullet body_test_motionPouleyKetchoupp
Synchronize fixes from the 3.x branch to keep Bullet code in sync for later, even if it's disabled for now.
2021-08-10Merge pull request #51457 from nekomatata/moving-platforms-3dRémi Verschelde
Fix 3D moving platform logic
2021-08-09Fix 3D moving platform logicPouleyKetchoupp
Same thing that was already done in 2D, applies moving platform motion by using a call to move_and_collide that excludes the platform itself, instead of making it part of the body motion. Helps with handling walls and slopes correctly when the character walks on the moving platform. Also made some minor adjustments to the 2D version and documentation. Co-authored-by: fabriceci <fabricecipolla@gmail.com>
2021-08-09Some work on double supportAaron Franke
2021-08-09Fix applied rotation from moving platforms in move_and_slidePouleyKetchoupp
When synchronizing CharacterBody motion with moving the platform using direct body state, only the linear velocity was taken into account. This change exposes velocity at local point in direct body state and uses it in move_and_slide to get the proper velocity that includes rotations.
2021-07-19One-directional collision layer check for rigid bodies and soft bodiesPouleyKetchoupp
Check for each body individually if it collides with the other one or ignores it. When a body is being ignored, the other body's mass is considered infinite when applying impulses to avoid extra overlapping.
2021-07-19Ensure KinematicBodies only interact with other Bodies with matching mask.Marcel Admiraal
2021-06-07Style: Cleanup uses of double spaces between wordsRémi Verschelde
Or after punctuation. Tried to leave third-party stuff alone, unless it has been heavily modified for Godot.
2021-06-04More explanatory names for RigidBody modesPouleyKetchoupp
MODE_DYNAMIC instead of MODE_RIGID MODE_DYNAMIC_LOCKED instead of MODE_CHARACTER No more special case for sleeping behavior for MODE_DYNAMIC_LOCKED (MODE_CHARACTER was forcing the body not to sleep, which is redundant with can_sleep and wasn't done in Bullet).
2021-06-03Disable 3D-only modules when 3D is disabledAaron Franke
2021-06-03Rename files and the exposed name for Transform3DAaron Franke
2021-06-03Rename Transform to Transform3D in coreAaron Franke
2021-04-22Unexpose _direct_state_changed in PhysicsBodyrafallus
Removed _direct_state_changed bindings Affects 2D and 3D nodes Callbacks now use Callable Tests were changed accordingly
2021-04-20Merge pull request #47347 from nekomatata/heightmap-supportRémi Verschelde
Heightmap collision shape support in Godot Physics
2021-04-06Check for the use of an empty shape in Bullet Kinematic collisionsMarcel Admiraal
2021-03-25Heightmap collision shape support in Godot PhysicsPouleyKetchoupp
2021-03-20Merge pull request #46937 from nekomatata/soft-body-supportRémi Verschelde
SoftBody support in GodotPhysics 3D
2021-03-18Disable backface collision with ConcavePolygonShape by defaultPouleyKetchoupp
Helps a lot with soft bodies and generally useful to avoid shapes to go through the ground in certain cases. Added an option in ConcavePolygonShape to re-enable backface collision on specific bodies if needed.
2021-03-18SoftBody support in GodotPhysics 3DPouleyKetchoupp
- Fixed SoftBody surface update with new rendering system - Added GodotPhysics implementation for SoftBody - Added support to get SoftBody rid to interact with the physics server - Added support to get SoftBody bounds from the physics server - Removed support for unused get_vertex_position and get_point_offset from the physics server - Removed SoftBody properties that are unused in both Bullet and GodotPhysics (angular and volume stiffness, pose matching) - Added RenderingServerHandler interface to PhysicsServer3D so the physics servers don't need to reference the class from SoftBody node directly
2021-03-12Fixes small typos and grammar correctionAnshul7sp1