summaryrefslogtreecommitdiff
path: root/modules/bullet
AgeCommit message (Collapse)Author
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
2021-03-06Added some checks to prevent accessing a null colliderDuddino
Previously godot would try to access `CollisionObjectBullet::bt_collision_object` even if it was null. Fixes #46651
2021-02-10Make Servers truly Thread Safereduz
-Rendering server now uses a split RID allocate/initialize internally, this allows generating RIDs immediately but initialization to happen later on the proper thread (as rendering APIs generally requiere to call on the right thread). -RenderingServerWrapMT is no more, multithreading is done in RenderingServerDefault. -Some functions like texture or mesh creation, when renderer supports it, can register and return immediately (so no waiting for server API to flush, and saving staging and command buffer memory). -3D physics server changed to be made multithread friendly. -Added PhysicsServer3DWrapMT to use 3D physics server from multiple threads. -Disablet Bullet (too much effort to make multithread friendly, this needs to be fixed eventually).
2021-02-08Initialize class/struct variables with default values in modules/Rafał Mikrut
2021-01-28Use real_t in physics codeAaron Franke
2021-01-14Merge pull request #43923 from madmiraal/fix-43588Rémi Verschelde
Fix cast_motion sometimes failing
2021-01-13Only remove Bullet's body constraints when removing body from spaceMarcel Admiraal
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-12-31Add signal to inform joint that body has exited treeMarcel Admiraal
2020-12-28Merge pull request #42881 from madmiraal/fix-39767Rémi Verschelde
Set Bullet collision shape index to zero when using a single shape or ConcavePolygonShape
2020-12-28Rename empty() to is_empty()Marcel Admiraal
2020-12-19Merge pull request #43898 from madmiraal/fix-43852Rémi Verschelde
Remove any constraints connected to a Bullet body when removing it
2020-12-18SCons: Add explicit dependencies on thirdparty code in cloned envRémi Verschelde
Since we clone the environments to build thirdparty code, we don't get an explicit dependency on the build objects produced by that environment. So when we update thirdparty code, Godot code using it is not necessarily rebuilt (I think it is for changed headers, but not for changed .c/.cpp files), which can lead to an invalid compilation output (linking old Godot .o files with a newer, potentially ABI breaking version of thirdparty code). This was only seen as really problematic with bullet updates (leading to crashes when rebuilding Godot after a bullet update without cleaning .o files), but it's safer to fix it everywhere, even if it's a LOT of hacky boilerplate.