Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErwin Coumans <blender@erwincoumans.com>2007-07-06 08:45:57 +0400
committerErwin Coumans <blender@erwincoumans.com>2007-07-06 08:45:57 +0400
commitfb622c7c3c50fa09c30774ba13bc8dda1a5d5041 (patch)
tree9a886e5ddce85d223fd05b207210bd5d628e2d0b /source/gameengine/Ketsji/KX_VehicleWrapper.cpp
parentf256efdb346f8623e361be42f4d86d4307b3a258 (diff)
//someone reversed axle direction conventions inside Bullet (axle winding), so need to compensate to keep game blender vehicles working the same.
Diffstat (limited to 'source/gameengine/Ketsji/KX_VehicleWrapper.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_VehicleWrapper.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/gameengine/Ketsji/KX_VehicleWrapper.cpp b/source/gameengine/Ketsji/KX_VehicleWrapper.cpp
index d92742d8799..fba2ecc223b 100644
--- a/source/gameengine/Ketsji/KX_VehicleWrapper.cpp
+++ b/source/gameengine/Ketsji/KX_VehicleWrapper.cpp
@@ -61,9 +61,9 @@ PyObject* KX_VehicleWrapper::PyAddWheel(PyObject* self,
aDir[0] = attachDir[0];
aDir[1] = attachDir[1];
aDir[2] = attachDir[2];
- aAxle[0] = attachAxle[0];
- aAxle[1] = attachAxle[1];
- aAxle[2] = attachAxle[2];
+ aAxle[0] = -attachAxle[0];//someone reverse some conventions inside Bullet (axle winding)
+ aAxle[1] = -attachAxle[1];
+ aAxle[2] = -attachAxle[2];
printf("attempt for addWheel: suspensionRestLength%f wheelRadius %f, hasSteering:%d\n",suspensionRestLength,wheelRadius,hasSteering);
m_vehicle->AddWheel(motionState,aPos,aDir,aAxle,suspensionRestLength,wheelRadius,hasSteering);
@@ -152,6 +152,7 @@ PyObject* KX_VehicleWrapper::PyApplyEngineForce(PyObject* self,
if (PyArg_ParseTuple(args,"fi",&force,&wheelIndex))
{
+ force *= -1.f;//someone reverse some conventions inside Bullet (axle winding)
m_vehicle->ApplyEngineForce(force,wheelIndex);
}
Py_INCREF(Py_None);