BGE bug #17491 fixed: BGE, Dupli instance with different scale, massive slowdown.
authorBenoit Bolsee <benoit.bolsee@online.be>
Thu, 21 Aug 2008 15:19:54 +0000 (15:19 +0000)
committerBenoit Bolsee <benoit.bolsee@online.be>
Thu, 21 Aug 2008 15:19:54 +0000 (15:19 +0000)
commite912ca9331d7f9637664e4588bdb72b0ebe76e5c
tree1e0c5acf6c732223c9daf4fc3505c9dbd5d5c2e2
parent4b9f5b2710fd90946dd378d3f004ddfd6e09cfb9
BGE bug #17491 fixed: BGE, Dupli instance with different scale, massive slowdown.

The root cause of this bug is the fact that Bullet shapes
are shared between duplicated game objects. As the physics
object scale is stored in the shape, all duplicas must
have the same scale otherwise the physics representation
is incorrect.
This fix introduces a mechanism to duplicate shapes at
runtime so that Bullet shapes are not shared anymore.
The drawback is an increased memory consuption.
A reference count mechanism will be introduced in a
later revision to keep Bullet shape shared between
duplicas that have the same scale.
projectfiles_vc7/gameengine/physics/PHY_Physics/PHY_Bullet/PHY_Bullet.vcproj
source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
source/gameengine/Ketsji/KX_Scene.cpp
source/gameengine/Ketsji/KX_Scene.h
source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
source/gameengine/Physics/Bullet/CcdPhysicsController.h
source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
source/gameengine/Physics/common/PHY_DynamicTypes.h