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>
|
<yRot>0.0</yRot>
|
||||||
<zRot>0.0</zRot>
|
<zRot>0.0</zRot>
|
||||||
<scale>1.0</scale>
|
<scale>1.0</scale>
|
||||||
<mass>8.0</mass>
|
<mass>11.0</mass>
|
||||||
</object>
|
</object>
|
||||||
</composition>
|
</composition>
|
||||||
|
|
||||||
|
@ -13079,7 +13079,7 @@
|
|||||||
|
|
||||||
<directionalLight>
|
<directionalLight>
|
||||||
<xOffset>-1.0</xOffset>
|
<xOffset>-1.0</xOffset>
|
||||||
<yOffset>-6</yOffset>
|
<yOffset>6</yOffset>
|
||||||
<zOffset>1.0</zOffset>
|
<zOffset>1.0</zOffset>
|
||||||
<rColour>1.0</rColour>
|
<rColour>1.0</rColour>
|
||||||
<gColour>1.0</gColour>
|
<gColour>1.0</gColour>
|
||||||
@ -13108,7 +13108,7 @@
|
|||||||
|
|
||||||
<physics>
|
<physics>
|
||||||
<friction>0.9</friction>
|
<friction>0.9</friction>
|
||||||
<strength>200.0</strength>
|
<strength>300.0</strength>
|
||||||
</physics>
|
</physics>
|
||||||
|
|
||||||
<positionConstraint>
|
<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
|
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;
|
info.m_restitution = 0.0f;
|
||||||
|
|
||||||
playerBall = new btRigidBody(info); //finally we create the rigid body using the info
|
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);
|
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);
|
btRigidBody* body = new btRigidBody(info);
|
||||||
|
|
||||||
body->setDamping(dampningL, dampningA);
|
body->setDamping(dampningL, dampningA);
|
||||||
|
Loading…
Reference in New Issue
Block a user