Apply patches in patches directory, remove patches that were applied
upstream.
If you made changes without adding a patch, please check.
Fixes [#32233] exporting bullet format results in corrupt files.
This reverts part of r53019.
While the compound shape trick works well in some cases, overall it's
much slower and even causes crashes under certain conditions.
We could make this and option and fix the crashes, but it's better to
implement convex decomposition anyway so just reverting for now.
Fixes [#34353] Ray cast on Triangle mesh bounded Rigid Body Object causes blender crash to desktop without error.
* Undoing the previous applyMovement() changes for characters. This was causing bugs for the Motion Actuator.
* Creating a Character Motion type for the Motion Actuator with specific controls for characters. This includes moving, rotating and jumping.
* Adding a KX_CharacterWrapper.walkDirection to set the character's direction and speed.
Note, this also resolves the following bugs:
[#33585] "Setting dLoc of motion actuator [0,0,0] via python won't stop object" reported by Manuel Bellersen (urfoex)
[#33503] "Character physics type won´t accept more than one motion anymore" reported by Mr Larodos
Note: this doesn't work yet for everything with latest stable bullet (2.81), need to look into why and likely apply some patches upstream.
However I managed to link blender by disabling some features, likely it can be made to work without too much trouble.
This commit is an attempt to improve collisions between moving Bullet rigid bodies using (concave) triangle mesh bounds.
Instead of using Gimpact, this we create a btCompoundShape with child shape tetrahedra derived from the surface triangles.
For each triangle, we add a fourth vertex using the centroid, shifting inwards using the triangle normal.
If the centroid hits an internal triangle, we stop. The default depth could be exposed as 'advanced' setting in the user interface.
This solution will be a slower than the original/gimpact solution, but a bit more reliable.
In the future, it is better to add HACD, convex decomposition to Blender, for moving concave meshes.
See http://kmamou.blogspot.com and the Bullet SDK's Demos/ConvexDecompositionDemo.
* jump() -- causes the character to jump
* onGround -- specifies whether or not the character is on the ground
* gravity -- controls the "gravity" that the character physics uses for the character
More options could be added (such as jump speed, step height, make fall speed, max slope, etc).
reported as [#29376] BMESH_TODO: remove tessface CD_ORIGINDEX layer
for a single mesh there could be 3 origindex mappings stored, one on the polygons and 2 on the tessfaces.
(CD_POLYINDEX and CD_ORIGINDEX).
as Andrew suggests, now tessfaces (which are really a cache of polygons), using origindex to point to polygons on
the same derived mesh, and polygons only store the original index values.
viewport. This helps to eliminate OpenGL calls in weird places like the physics
code and to reduce glGet calls, which are expensive.
There should be no functional changes (except maybe a very slight speed improvement).
The functions had no effect because m_solverInfo wasn't used anywhere.
Now we get the solver info from the dynamics world directly instead of using our own copy.
Note: This fix could cause other issues with shared physics meshes. In general, we may want to re-evaluate how we handle updating potentially shared physics meshes.
The problem was that the physics shapes for the near and radar sensor were getting turned into characters because CcdConstructionInfo::m_bCharacter was defaulting to true. Now it defaults to false and is explicitly set to true for only Character physics types.