Merge branch 'master' of github.com:Faerbit/swp
This commit is contained in:
commit
6f89c406f1
3
level.cc
3
level.cc
@ -32,7 +32,7 @@ void Level::load(ACGL::OpenGL::SharedShaderProgram shader) {
|
|||||||
this->physics.addPlayer(1.25f,0.0f,10.0f,0.0f,1.0f,0);
|
this->physics.addPlayer(1.25f,0.0f,10.0f,0.0f,1.0f,0);
|
||||||
objects.push_back(object);
|
objects.push_back(object);
|
||||||
|
|
||||||
physics.addStaticGroundPlane();
|
//physics.addStaticGroundPlane();
|
||||||
|
|
||||||
Model torchModel = Model("torch.obj", 0.75f);
|
Model torchModel = Model("torch.obj", 0.75f);
|
||||||
Material torchMaterial = Material("torchTexture.png", 0.1f, 0.3f, 0.7f, 10.0f);
|
Material torchMaterial = Material("torchTexture.png", 0.1f, 0.3f, 0.7f, 10.0f);
|
||||||
@ -98,6 +98,7 @@ void Level::update(float runTime, glm::vec2 mouseDelta, bool wPressed, bool aPre
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
mouseDelta.x = -mouseDelta.x;
|
||||||
camera.updateRotation(mouseDelta/100.0f);
|
camera.updateRotation(mouseDelta/100.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ void Physics::addTerrain(int width, int length, float** heightData)
|
|||||||
|
|
||||||
btRigidBody* tBody = new btRigidBody(0,new btDefaultMotionState(),terrianShape);
|
btRigidBody* tBody = new btRigidBody(0,new btDefaultMotionState(),terrianShape);
|
||||||
|
|
||||||
tBody->getWorldTransform().setOrigin(btVector3(0,5*highest/10,0));
|
tBody->getWorldTransform().setOrigin(btVector3(0,highest/2,0));
|
||||||
|
|
||||||
//tBody->getWoorldTransform().setRotation(btQuaternion(0,0,0,1));
|
//tBody->getWoorldTransform().setRotation(btQuaternion(0,0,0,1));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user