From 28119ea9068ec9c0b9a2772fddf14b441c00495a Mon Sep 17 00:00:00 2001 From: Jasper Date: Mon, 9 Mar 2015 17:01:14 +0100 Subject: [PATCH] modified marbel rolling and box to allow somewhat easier movement --- data/levels/Compositions.xml | 2 +- data/levels/Level1.xml | 4 ++-- physics.cc | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/data/levels/Compositions.xml b/data/levels/Compositions.xml index 3dd1df3..252cbbc 100644 --- a/data/levels/Compositions.xml +++ b/data/levels/Compositions.xml @@ -14,7 +14,7 @@ 0.0 0.0 1.0 - 8.0 + 11.0 diff --git a/data/levels/Level1.xml b/data/levels/Level1.xml index 74c5b5f..8d70bd0 100644 --- a/data/levels/Level1.xml +++ b/data/levels/Level1.xml @@ -13079,7 +13079,7 @@ -1.0 - -6 + 6 1.0 1.0 1.0 @@ -13108,7 +13108,7 @@ 0.9 - 200.0 + 300.0 diff --git a/physics.cc b/physics.cc index b984192..0b8cfa3 100644 --- a/physics.cc +++ b/physics.cc @@ -162,7 +162,7 @@ void Physics::addPlayer(float friction, float rad, Entity entity, float mass, fl btRigidBody::btRigidBodyConstructionInfo info(mass,motion,sphere,inertia); //next we process all data for the rigid body into info - info.m_friction = friction*2; //here we modify the friction and restitution (bounciness) of the object + info.m_friction = friction; //here we modify the friction and restitution (bounciness) of the object info.m_restitution = 0.0f; playerBall = new btRigidBody(info); //finally we create the rigid body using the info @@ -379,6 +379,9 @@ void Physics::addButton(float width, float height, float length, Entity entity, } btRigidBody::btRigidBodyConstructionInfo info(mass,motion,box,inertia); + info.m_friction = 0.2; //here we modify the friction and restitution (bounciness) of the object + info.m_restitution = 0.0f; + btRigidBody* body = new btRigidBody(info); body->setDamping(dampningL, dampningA);