getting the sizes juuuuuuuust right
This commit is contained in:
parent
bcb594c4cf
commit
dbce8c229f
7
level.cc
7
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);
|
||||
}
|
||||
|
||||
|
@ -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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user