BGE patch #28476: Character object physics type
authorBenoit Bolsee <benoit.bolsee@online.be>
Mon, 28 May 2012 21:36:29 +0000 (21:36 +0000)
committerBenoit Bolsee <benoit.bolsee@online.be>
Mon, 28 May 2012 21:36:29 +0000 (21:36 +0000)
commitdfc19a1ff7968e547c33ef3304849f69ddf76f4f
tree62764fb4d5ebf37785a1d34dcda7e01d4392bc18
parent4e0492e3bc59a4adca8ea5075a96bc78cd6bb67a
BGE patch #28476: Character object physics type
===============================================
This patch adds a new "Character" BGE physics type which uses Bullet's btKinematicCharacter for simulation instead of full-blown dynamics. It is appropiate for (player-controlled) characters, for which the other physics types often result unexpected results (bouncing off walls, sliding etc.) and for which simple kinematics offers much more precision.

"Character" can be chosen like any other physics type in the "Physics" section of the properties window. Current settings for tweaking are "Step Height" (to make the object automatically climb small steps if it collides with them), "Fall Speed" (the maximum speed that the object can have when falling) and "Jump Speed", which is currently not used.

See http://projects.blender.org/tracker/?func=detail&atid=127&aid=28476&group_id=9
for sample blends and a discussion on the patch: how to use it and what influences the behavior of the character object.

Known problem: there is a crash if the "compound" option is set in the physics panel of the Character object.
21 files changed:
extern/bullet2/CMakeLists.txt
extern/bullet2/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.h
extern/bullet2/src/BulletDynamics/Character/btKinematicCharacterController.cpp
extern/bullet2/src/SConscript
release/scripts/startup/bl_ui/properties_game.py
source/blender/blenkernel/intern/object.c
source/blender/makesdna/DNA_object_types.h
source/blender/makesrna/intern/rna_object.c
source/blender/python/generic/py_capi_utils.c
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
source/gameengine/Ketsji/KX_BulletPhysicsController.h
source/gameengine/Ketsji/KX_ConvertPhysicsObject.h
source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
source/gameengine/Ketsji/KX_IPhysicsController.cpp
source/gameengine/Ketsji/KX_IPhysicsController.h
source/gameengine/Ketsji/KX_Scene.cpp
source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
source/gameengine/Physics/Bullet/CcdPhysicsController.h
source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
source/gameengine/Physics/common/PHY_Pro.h