godot/modules
Daniel Rakos 6dd65c0d67 KinematicBody performance and quality improvements
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-03-27 00:39:47 +01:00
..
bmp
bullet KinematicBody performance and quality improvements 2019-03-27 00:39:47 +01:00
csg Add priority to gizmos and fix small issues 2019-03-12 00:30:50 +01:00
cvtt
dds Add -Wshadow=local to warnings and fix reported issues. 2019-02-20 19:44:12 +01:00
enet Fix all -Wtype-limits warnings. 2019-02-21 19:34:35 +01:00
etc
freetype
gdnative [GDNative] fix NativeScript leak in editor 2019-03-22 12:54:19 +01:00
gdscript Fix duplicated lines in GDScript bytecode 2019-03-14 18:38:07 +02:00
gridmap Merge pull request #26309 from bojidar-bg/21536-resize-gridmap-previews 2019-03-16 11:15:41 -07:00
hdr
jpg
mbedtls Small hack to avoid runtime error when using ubsan 2019-02-20 01:49:47 +01:00
mobile_vr
mono Merge pull request #27359 from neikeq/who-reads-docs-anyway 2019-03-23 20:49:59 +01:00
ogg
opensimplex doc: Sync classref with current source 2019-03-07 10:54:42 +01:00
opus SCons: Move platform-specific Opus config to its module 2019-03-02 10:30:25 +01:00
pvr Fix -Wsign-compare warnings. 2019-02-27 07:45:57 +01:00
recast Add -Wshadow=local to warnings and fix reported issues. 2019-02-20 19:44:12 +01:00
regex
squish
stb_vorbis -Properly handle missing ETC support on export 2019-02-26 18:45:06 -03:00
svg
tga
thekla_unwrap
theora Add -Wshadow=local to warnings and fix reported issues. 2019-02-20 19:44:12 +01:00
tinyexr
upnp
visual_script Merge pull request #26608 from dragmz/fix22231 2019-03-04 21:52:47 +01:00
vorbis
webm
webp libwebp: Sync with upstream 1.0.2 2019-03-04 13:13:33 +01:00
websocket Update libwebsockets to 3.1 (plus UWP patch) 2019-03-06 02:02:52 +01:00
xatlas_unwrap Fix -Wsign-compare warnings. 2019-02-27 07:45:57 +01:00
register_module_types.h
SCsub