Blender Git Loki

Git Commits -> Revision c5c2883

Revision c5c2883 by Sybren A. Stüvel (master)
June 28, 2015, 10:54 (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: c5c2883ce039a35945282b770ad77f461cdf05ad
Parent Commit: 32319dd
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)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021