Fixed 3122615: acid lake in xr591 did not trigger rescue (the lake mesh
had a rotation applied. Due to this bug an incorrect rotation was applied to the mesh, resulting in the wrong bullet mesh, so that the collision was not detected). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6818 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -398,7 +398,11 @@ void Track::convertTrackToBullet(scene::ISceneNode *node)
|
||||
core::matrix4 mat;
|
||||
mat.setRotationDegrees(hpr);
|
||||
mat.setTranslation(pos);
|
||||
mat.setScale(scale);
|
||||
core::matrix4 mat_scale;
|
||||
// Note that we can't simply call mat.setScale, since this would
|
||||
// overwrite the elements on the diagonal, making any rotation incorrect.
|
||||
mat_scale.setScale(scale);
|
||||
mat *= mat_scale;
|
||||
for(unsigned int i=0; i<mesh->getMeshBufferCount(); i++) {
|
||||
scene::IMeshBuffer *mb = mesh->getMeshBuffer(i);
|
||||
// FIXME: take translation/rotation into account
|
||||
|
||||
Reference in New Issue
Block a user