modified marbel rolling and box to allow somewhat easier movement
This commit is contained in:
parent
f71f9e0590
commit
28119ea906
@ -14,7 +14,7 @@
|
||||
<yRot>0.0</yRot>
|
||||
<zRot>0.0</zRot>
|
||||
<scale>1.0</scale>
|
||||
<mass>8.0</mass>
|
||||
<mass>11.0</mass>
|
||||
</object>
|
||||
</composition>
|
||||
|
||||
|
@ -13079,7 +13079,7 @@
|
||||
|
||||
<directionalLight>
|
||||
<xOffset>-1.0</xOffset>
|
||||
<yOffset>-6</yOffset>
|
||||
<yOffset>6</yOffset>
|
||||
<zOffset>1.0</zOffset>
|
||||
<rColour>1.0</rColour>
|
||||
<gColour>1.0</gColour>
|
||||
@ -13108,7 +13108,7 @@
|
||||
|
||||
<physics>
|
||||
<friction>0.9</friction>
|
||||
<strength>200.0</strength>
|
||||
<strength>300.0</strength>
|
||||
</physics>
|
||||
|
||||
<positionConstraint>
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user