summaryrefslogtreecommitdiff
path: root/modules/bullet
AgeCommit message (Collapse)Author
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-12-09Check that motion is not zero before doing a sweep test.Marcel Admiraal
Fixes #25476.
2019-10-28Fix some crashes and using null pointersRafał Mikrut
2019-10-14Call activate function when setting RigidBodyBullet activation state.Marcel Admiraal
2019-10-08Fixed RigidBody stuttering when changing collision layer/maskPouleyKetchoupp
- Changing collision layer/mask now only updates the broadphase proxy to avoid the velocity to be reset each time (also avoids unnecessary computations) - No rigid body update at all when the collision layer/mask stays the same - Same changes for Area for optimization purpose Fixes #32577
2019-08-12Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in rest of 'modules/'Robin Hübner
2019-08-07Fixed KinematicCollision.get_local_shape() - the local shape id was never ↵PouleyKetchoupp
set during move_and_collide() Fixes #31144
2019-07-23Update some dead links in the codebaseMichael Alexsander Silva Dias
2019-07-23Fix some code found by Coverity Scan and PVS Studioqarmin
2019-07-07Fixes minor issues found by static analyzerqarmin
2019-07-03SCons: Use CPPDEFINES instead of CPPFLAGS for pre-processor definesRémi Verschelde
It's the recommended way to set those, and is more portable (automatically prepends -D for GCC/Clang and /D for MSVC). We still use CPPFLAGS for some pre-processor flags which are not defines.
2019-07-01Merge pull request #29980 from Dentrax/directed-by-qarminRémi Verschelde
Fix some editor crashes
2019-07-01fix some crashesFurkan Türkal
2019-06-24Merge pull request #29938 from jonri/fix-collisionshape-scaleRémi Verschelde
Fix updating of collision shape when the transform is set
2019-06-20Fix updating of collision shape when the transform is setJon Ring
2019-06-19Made use of semicolons more consitent, fixed formattingJohnJLight
2019-06-11Fix error macro calls not ending with semicolonRémi Verschelde
It's not necessary, but the vast majority of calls of error macros do have an ending semicolon, so it's best to be consistent. Most WARN_DEPRECATED calls did *not* have a semicolon, but there's no reason for them to be treated differently.
2019-06-11bullet: Sync with current upstream master branchRémi Verschelde
This updates our local copy to commit 5ec8339b6fc491e3f09a34a4516e82787f053fcc. We need a recent master commit for some new features that we use in Godot (see #25543 and #28909). To avoid warnings generated by Bullet headers included in our own module, we include those headers with -isystem on GCC and Clang. Fixes #29503.
2019-05-19Fix typos with codespellRémi Verschelde
Using codespell 1.15.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear doubleclick leapyear lod merchantibility nd numer ois ony que seeked synching te uint unselect webp EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
2019-05-16Merge pull request #28595 from godotengine/AndreaCatania-patch-1Max Hilbrunner
Improved CCD calculation algorithm
2019-05-16Improved CCD calculation algorithmAndrea Catania
2019-05-16Revert "Revert "Implemented terrain raycast acceleration""Rémi Verschelde
2019-05-13Merge pull request #28326 from BastiaanOlij/center_heightmapRémi Verschelde
Center shape according to logic Bullet applies
2019-05-09Change "ID" to lowercase "id"Aaron Franke
Reasoning: ID is not an acronym, it is simply short for identification, so it logically should not be capitalized. But even if it was an acronym, other acronyms in Godot are not capitalized, like p_rid, p_ip, and p_json.
2019-05-07Add transform support to deal with Bullets centering of shapesBastiaan Olij
2019-05-02Merge pull request #27415 from aqnuep/kinematicbody_fixesRémi Verschelde
KinematicBody performance and quality improvements
2019-04-30SCons: Always use env.Prepend for CPPPATHRémi Verschelde
Include paths are processed from left to right, so we use Prepend to ensure that paths to bundled thirdparty files will have precedence over system paths (e.g. `/usr/include` should have lowest priority).
2019-04-30Merge pull request #27371 from ShyRed/fixdisabled2dcollisionsRémi Verschelde
Allow adding disabled shapes
2019-04-24SCons: Review uses of CCFLAGS, CXXFLAGS and CPPFLAGSRémi Verschelde
Many contributors (me included) did not fully understand what CCFLAGS, CXXFLAGS and CPPFLAGS refer to exactly, and were thus not using them in the way they are intended to be. As per the SCons manual: https://www.scons.org/doc/HTML/scons-user/apa.html - CCFLAGS: General options that are passed to the C and C++ compilers. - CFLAGS: General options that are passed to the C compiler (C only; not C++). - CXXFLAGS: General options that are passed to the C++ compiler. By default, this includes the value of $CCFLAGS, so that setting $CCFLAGS affects both C and C++ compilation. - CPPFLAGS: User-specified C preprocessor options. These will be included in any command that uses the C preprocessor, including not just compilation of C and C++ source files [...], but also [...] Fortran [...] and [...] assembly language source file[s]. TL;DR: Compiler options go to CCFLAGS, unless they must be restricted to either C (CFLAGS) or C++ (CXXFLAGS). Preprocessor defines go to CPPFLAGS.
2019-04-23Allow adding disabled shapesShyRed
Adds the ability to directly add disabled shapes to a collision object. Before this commit a shape has always been assumed to be enabled and had to be disabled in an extra step.
2019-04-23Revert "Implemented terrain raycast acceleration"Rémi Verschelde
2019-04-23Merge pull request #25543 from Zylann/optimize_bullet_heightfield_raycast2Hein-Pieter van Braam
Implemented terrain raycast acceleration
2019-04-23Merge pull request #27730 from ShyRed/fix3dphyscansleepHein-Pieter van Braam
Fix missing re-activation of bullet physics sleep feature
2019-04-19doc: Drop unused <demos> tagRémi Verschelde
2019-04-06Fix missing re-activation of bullet physics sleep featureShyRed
Adds the missing option of re-enabling the sleep feature in bullet physics once a body had the sleep feature disabled.
2019-04-04Fix wrong heights data used to compute min and max heightsMarc Gilleron
2019-04-01doc: Bump version to 3.2Rémi Verschelde
2019-03-27KinematicBody performance and quality improvementsDaniel Rakos
With this change finally one can use compound collisions (like those created by Gridmaps) without serious performance issues. The previous KinematicBody code for Bullet was practically doing a whole bunch of unnecessary calculations. Gridmaps with fairly large octant sizes (in my case 32) can get up to 10000x speedup with this change (literally!). I expect the FPS demo to get a fair speedup as well. List of fixes and improvements: - Fixed a general bug in move_and_slide that affects both GodotPhysics and Bullet, where ray shapes would be ignored unless the stop_on_slope parameter is disabled. Not sure where that came from, but looking at the 2D physics code it was obvious there's a difference. - Enabled the dynamic AABB tree that Bullet uses to allow broadphase collision tests against individual shapes of compound shapes. This is crucial to get good performance with Gridmaps and in general improves the performance whenever a KinematicBody collides with compound collision shapes. - Added code to the broadphase collision detection code used by the Bullet module for KinematicBodies to also do broadphase on the sub-shapes of compound collision shapes. This is possible thanks to the dynamic AABB tree that was previously disabled and it's the change that provides the biggest performance boost. - Now broadphase test is only done once per KinematicBody in Bullet instead of once per each of its shapes which was completely unnecessary. - Fixed the way how the ray separation results are populated in Bullet which was completely broken previously, overwriting previous results and similar non-sense. - Fixed ray shapes for good now. Previously the margin set in the editor was not respected at all, and the KinematicBody code for ray separation was complete bogus, thus all previous attempts to fix it were mislead. - Fixed an obvious bug also in GodotPhysics where an out-of-bounds index was used in the ray result array. There are a whole set of other problems with the KinematicBody code of Bullet which cost performance and may cause unexpected behavior, but those are not addressed in this change (need to keep it "simple"). Not sure whether this fixes any outstanding Github issues but I wouldn't be surprised.
2019-02-22Revert "Optimized area check"Rémi Verschelde
2019-02-21Fix warnings seen with -Wignored-qualifiers.marxin
2019-02-21Merge pull request #26111 from AndreaCatania/areaoptiRémi Verschelde
Optimized area check
2019-02-21Optimized area checkAndrea Catania
2019-02-20Fix RayShape collision jitter when used with a RigidBodyDaniel Rakos
Scaling the depth was the wrong solution for the KinematicBody jitter because it causes jitter with RigidBody. Instead scale the margin that is ignored to allow KinematicBody to still pick up the ray shape in the kinematic test when the shape is just at margin distance from another one. This solution does not cause jitter with either KinematicBody or RigidBody.
2019-02-19Merge pull request #25788 from aqnuep/rayshape_fixRémi Verschelde
Fix RayShape collision when used with a KinematicBody (Bullet Physics)
2019-02-19Fix RayShape collision when used with a KinematicBody (Bullet Physics)Daniel Rakos
- Added code handling non-compound collision to recover_from_penetration_ray() which is now needed due to the optimization avoiding the use of compound collisions when only a single collision shape is used. - Removed arbitrary margin applied in the collision algorithm of RayShapes which causes jittered movement. For lack of a better replacement and for lack of any explanation on why it has been introduced, it's now using the shape's margin property instead which is small enough to not show visible jitter. - Tried to get rid of inconsistent uses of the collision margin. - Removed hack from GodotDeepPenetrationContactResultCallback::addContactPoint for RayShape collision as it's no longer needed as the collision algorithm of RayShapes correctly calculates the contact normal for a while now. Fixes #25227.
2019-02-18Merge pull request #26014 from AndreaCatania/bugfixRémi Verschelde
Fixed area collision report with concave
2019-02-18Fixed area collision report with concaveAndrea Catania
2019-02-18Merge pull request #26011 from AndreaCatania/bugfixRémi Verschelde
Added support to scale areas, fixes #23448
2019-02-18Added support to scale areasAndrea Catania
2019-02-12Merge pull request #25481 from hpvb/fix-ubsan-asan-reportsRémi Verschelde
Fix many asan and ubsan reported issues