BGE #30734: add support for physics linear and angular thresholds and deactivation...
authorBenoit Bolsee <benoit.bolsee@online.be>
Tue, 29 May 2012 20:30:33 +0000 (20:30 +0000)
committerBenoit Bolsee <benoit.bolsee@online.be>
Tue, 29 May 2012 20:30:33 +0000 (20:30 +0000)
commit58bc424b3c46ee3ee6644ff578671670c2a1c8ec
tree147b691cecd0286e750fd73f0c6a2edad8ab9b90
parent1d4ab9daf0ef38066469fb86bed0fc24b2e1bbda
BGE #30734: add support for physics linear and angular thresholds and deactivation time from python and GUI.
========================
The linear and angular thresholds set the speed limit (in m/s) and rotation limit (in rad/s)
under which a rigid body will go to sleep (stop moving) if it stays below the limits for a
time equal or longer than the deactivation time (sleeping is disabled is deactivation time is
set to 0).
These settings help reducing the processing spent on Physics during the game.

Previously they were only accessible from python but not working because of a bug.
Now the python functions are working and the settings are available in the Physics panel
of the World settings when using the Blender Game render engine.

Python API:
  import PhysicsConstraints
  PhysicsConstraints.setDeactivationLinearTreshold(float)
  PhysicsConstraints.setDeactivationAngularTreshold(float)
release/scripts/startup/bl_ui/properties_game.py
source/blender/blenkernel/BKE_blender.h
source/blender/blenkernel/intern/scene.c
source/blender/blenloader/intern/readfile.c
source/blender/makesdna/DNA_object_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesrna/intern/rna_scene.c
source/gameengine/Converter/KX_BlenderSceneConverter.cpp
source/gameengine/Physics/Bullet/CcdPhysicsController.cpp