diff options
author | Erwin Coumans <blender@erwincoumans.com> | 2006-02-22 09:58:05 +0300 |
---|---|---|
committer | Erwin Coumans <blender@erwincoumans.com> | 2006-02-22 09:58:05 +0300 |
commit | c2782ce10e00535f92921432f79ae00bf750509a (patch) | |
tree | 05e80e1cf88b2ec73bb3b7a7b0d2953b0e8368ef /extern | |
parent | dcb751725ed3057c29aca57f04479ef9a4380d82 (diff) |
added 'disable sleeping' option for rigidbodies. + bugfix of out of sync wheels for vehicle
Diffstat (limited to 'extern')
3 files changed, 8 insertions, 0 deletions
diff --git a/extern/bullet/Bullet/CollisionDispatch/CollisionDispatcher.cpp b/extern/bullet/Bullet/CollisionDispatch/CollisionDispatcher.cpp index a12051455fa..cd2da116522 100644 --- a/extern/bullet/Bullet/CollisionDispatch/CollisionDispatcher.cpp +++ b/extern/bullet/Bullet/CollisionDispatch/CollisionDispatcher.cpp @@ -119,6 +119,11 @@ void CollisionDispatcher::BuildAndProcessIslands(int numBodies, IslandCallback* { allSleeping = false; } + if ((((CollisionObject*)manifold->GetBody0()) && ((CollisionObject*)manifold->GetBody0())->GetActivationState()== DISABLE_DEACTIVATION) || + (((CollisionObject*)manifold->GetBody1()) && ((CollisionObject*)manifold->GetBody1())->GetActivationState() == DISABLE_DEACTIVATION)) + { + allSleeping = false; + } islandmanifold.push_back(manifold); } diff --git a/extern/bullet/Bullet/NarrowPhaseCollision/CollisionObject.h b/extern/bullet/Bullet/NarrowPhaseCollision/CollisionObject.h index c83d73938ee..4df10832dea 100644 --- a/extern/bullet/Bullet/NarrowPhaseCollision/CollisionObject.h +++ b/extern/bullet/Bullet/NarrowPhaseCollision/CollisionObject.h @@ -7,6 +7,7 @@ #define ACTIVE_TAG 1 #define ISLAND_SLEEPING 2 #define WANTS_DEACTIVATION 3 +#define DISABLE_DEACTIVATION 4 struct BroadphaseProxy; class CollisionShape; diff --git a/extern/bullet/BulletDynamics/Vehicle/RaycastVehicle.cpp b/extern/bullet/BulletDynamics/Vehicle/RaycastVehicle.cpp index 096ccfd85d2..a4bd0612833 100755 --- a/extern/bullet/BulletDynamics/Vehicle/RaycastVehicle.cpp +++ b/extern/bullet/BulletDynamics/Vehicle/RaycastVehicle.cpp @@ -92,7 +92,9 @@ const SimdTransform& RaycastVehicle::GetWheelTransformWS( int wheelIndex ) const void RaycastVehicle::UpdateWheelTransform( int wheelIndex ) { + WheelInfo& wheel = m_wheelInfo[ wheelIndex ]; + UpdateWheelTransformsWS(wheel); SimdVector3 up = -wheel.m_raycastInfo.m_wheelDirectionWS; const SimdVector3& right = wheel.m_raycastInfo.m_wheelAxleWS; SimdVector3 fwd = up.cross(right); |