fixed terrain offset
This commit is contained in:
parent
c403814cd6
commit
10f51db60f
@ -51,6 +51,7 @@ void Physics::addTerrain(int width, int length, float** heightData)
|
||||
}
|
||||
}
|
||||
|
||||
highest++;
|
||||
/*
|
||||
heightfield[j*length+i] = heightData[i][j];
|
||||
if (heightData[i][j] > highest)
|
||||
@ -61,7 +62,7 @@ void Physics::addTerrain(int width, int length, float** heightData)
|
||||
|
||||
btRigidBody* tBody = new btRigidBody(0,new btDefaultMotionState(),terrianShape);
|
||||
|
||||
tBody->getWorldTransform().setOrigin(btVector3(0,highest/2,0));
|
||||
tBody->getWorldTransform().setOrigin(btVector3(0,((float)highest - 1)/2,0));
|
||||
|
||||
//tBody->getWoorldTransform().setRotation(btQuaternion(0,0,0,1));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user