Blender Git Commit Log

Git Commits -> Revision adba575

June 29, 2015, 13:46 (GMT)
BGE Fix: apply velocity clamping on every physics subtick

This patch uses the Bullet "internal tick callback" functionality to
ensure that velocity clamping is performed after every physics update.
This makes a difference when physics subticks > 1, as in that case the
too-high velocity could have impacted the simulation.

This patch follows the examples at [1] and [2]; the latter example
also explains that the way we limit velocity in the BGE (before this
patch) is wrong.

[1] http://bulletphysics.org/mediawiki-1.5.8/index.php/Simulation_Tick_Callbacks
[2] http://www.bulletphysics.org/mediawiki-1.5.8/index.php/Code_Snippets#I_want_to_cap_the_speed_of_my_spaceship;

Reviewed by: panzergame

Differential Revision: https://developer.blender.org/D1364

Commit Details:

Full Hash: adba5756050b37d4193f16aee35cdc001d2a4adf
Parent Commit: a08f1d0
Committed By: Sergey Sharybin
Lines Changed: +51, -13

4 Modified Paths:

/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp (+18, -13) (Diff)
/source/gameengine/Physics/Bullet/CcdPhysicsController.h (+7, -0) (Diff)
/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp (+17, -0) (Diff)
/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h (+9, -0) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021