summaryrefslogtreecommitdiff
path: root/modules/bullet
AgeCommit message (Collapse)Author
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.
2020-12-15Remove Generic6DOFJoint precision propertyMarcel Admiraal
2020-11-27Fix cast_motion sometimes failingMarcel Admiraal
- Fixes Godot physics failing when the cast Shape is inside of, or already colliding with another Shape. - Fixes Bullet physics failing when there is no motion. - Ensures Godot and Bullet physics behave the same. - Updates the documentation to exclude the caveats for the failures and differences.
2020-11-26Remove any constraints connected to a Bullet body when removing itMarcel Admiraal
2020-11-25Fixed ccd enabled by default on Bullet bodiesPouleyKetchoupp
It was due to main_shape_changed being called two times for each added body. The first time it disables ccd, which sets the internal ccd threshold to be 10000. The second time, it enables ccd again because the internal threshold is > 0. Bodies are now consistently set with a ccd threshold of 0 when ccd is disabled. This was causing crashing asserts in Bullet when adding bodies in some scenarios, in btVector3::normalize(): btAssert(!fuzzyZero()); These crashes will still happen with ccd enabled.
2020-11-16Merge pull request #42167 from madmiraal/fix-42108Rémi Verschelde
Remove the unnecessary sync() and the restrictions it imposes on 3D Physics.
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
2020-10-19Set Bullet collision shape index to zero when using a single shapeMarcel Admiraal
or ConcavePolygonShape3D.
2020-10-18Refactor MethodBind to use variadic templatesreduz
Removed make_binders and the old style generated binders.
2020-10-15Merge pull request #42649 from madmiraal/reapply-41806Rémi Verschelde
Reapply -Avoid adding margin twice along capsule Y axis
2020-10-13Merge pull request #42592 from madmiraal/fix-42567Rémi Verschelde
Initialise Bullet RigidBody friction to the expected value of 1.0
2020-10-08Reapply -Avoid adding margin twice along capsule Y axisMarcel Admiraal
Co-authored-by: Andrea Catania <info@andreacatania.com>
2020-10-08Fixed #41040 in an alternative way now that #39726 is revertedAndrea Catania
2020-10-08Revert "Optimized physics object spawn time and optimized shape usage when ↵Andrea Catania
the shape is not scaled" This reverts commit 7709a8349354b469361ec7e1429af0dc8af80b2a.
2020-10-08Revert "- Enhanced the flush mechanism by flushing only needed thing."Andrea Catania
This reverts commit 8d0d6d6921d5dfb398f4ab04e4d3937ab550c4ff.
2020-10-06Initialise Bullet RigidBody friction to the expected value of 1.0Marcel Admiraal