From 6c32a0c35ae5e4870947fcb8c5ebe64d70c5c567 Mon Sep 17 00:00:00 2001 From: Jasper Date: Mon, 17 Nov 2014 16:28:31 +0100 Subject: [PATCH] getting the sizes juuuuuuuust right --- level.cc | 7 ++++--- physics.cc | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/level.cc b/level.cc index 17c64d6..f62dec5 100644 --- a/level.cc +++ b/level.cc @@ -25,14 +25,14 @@ void Level::load(ACGL::OpenGL::SharedShaderProgram shader) { // load a texture: Material material = Material("marbleTexture.png", 0.1f, 0.5f, 0.5f, 3.0f); //Create object - Object object = Object(model, material, glm::vec3(0.0f, 5.0f, 0.0f), + Object object = Object(model, material, glm::vec3(0.0f, 10.0f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f), shader); //add player to phy - this->physics.addPlayer(0.75f,0.0f,5.0f,0.0f,1.0f,0); + this->physics.addPlayer(1.25f,0.0f,10.0f,0.0f,1.0f,0); objects.push_back(object); - physics.addStaticGroundPlane(); + //physics.addStaticGroundPlane(); Model torchModel = Model("torch.obj", 0.75f); 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++; } else { + mouseDelta.x = -mouseDelta.x; camera.updateRotation(mouseDelta/100.0f); } diff --git a/physics.cc b/physics.cc index b9d132f..39e55d1 100644 --- a/physics.cc +++ b/physics.cc @@ -61,7 +61,7 @@ void Physics::addTerrain(int width, int length, float** heightData) 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));