diff options
author | Erwin Coumans <blender@erwincoumans.com> | 2006-12-03 01:25:47 +0300 |
---|---|---|
committer | Erwin Coumans <blender@erwincoumans.com> | 2006-12-03 01:25:47 +0300 |
commit | 438d114f1ac3c8eaa4c1d9d8ffa31271a51c85e6 (patch) | |
tree | 030c8c62a46ed0b3a527eb7cc25e277e303c59f5 /source/gameengine/Physics | |
parent | 08ef0d346653bbe746231fdd3c94b5b3313a84a5 (diff) |
- GEadded VSYNC for Mac OS X swapbuffers (can be easily undone by commenting out the #define WAIT_FOR_VSYNC 1
- GEdon't crash when attempting to add constraint on game objects without physics controller
- GEimproved some physics -> graphics synchronization issues
- small experiment with game engine timing to smooth framerate/reduce tearing
Diffstat (limited to 'source/gameengine/Physics')
-rw-r--r-- | source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp index db5de7c7d43..a4fdffd0b58 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp +++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp @@ -108,8 +108,8 @@ public: { btWheelInfo& info = m_vehicle->getWheelInfo(i); PHY_IMotionState* motionState = (PHY_IMotionState*)info.m_clientInfo ; - m_vehicle->updateWheelTransform(i); - btTransform trans = m_vehicle->getWheelTransformWS(i); + m_vehicle->updateWheelTransform(i,true); + btTransform trans = m_vehicle->getWheelInfo(i).m_worldTransform; btQuaternion orn = trans.getRotation(); const btVector3& pos = trans.getOrigin(); motionState->setWorldOrientation(orn.x(),orn.y(),orn.z(),orn[3]); @@ -457,13 +457,13 @@ bool CcdPhysicsEnvironment::proceedDeltaTime(double curTime,float timeStep) ctrl->SynchronizeMotionStates(timeStep); } - m_dynamicsWorld->stepSimulation(timeStep,5);//5); + m_dynamicsWorld->stepSimulation(timeStep,2); numCtrl = GetNumControllers(); for (i=0;i<numCtrl;i++) { CcdPhysicsController* ctrl = GetPhysicsController(i); - ctrl->SynchronizeMotionStates(timeStep); + //ctrl->SynchronizeMotionStates(timeStep); } for (i=0;i<m_wrapperVehicles.size();i++) |