Scaling of the player ball is now possible.

This commit is contained in:
Steffen Fündgens 2015-02-03 12:36:42 +01:00
parent c57d73317c
commit df884666b5
2 changed files with 3 additions and 2 deletions

View File

@ -355,7 +355,7 @@
<!-- Do not change the radius, it has to match the .obj -->
<objectData>
<modelPath>marbleSmooth.obj</modelPath>
<texturePath>Marbletexture.png</texturePath>
@ -364,7 +364,7 @@
<specularFactor>0.5</specularFactor>
<shininess>3.0</shininess>
<physicType>Player</physicType>
<radius>1</radius>
<radius>1.0</radius>
<dampningL>0.15 </dampningL>
<dampningA>0.7</dampningA>
</objectData>

View File

@ -267,6 +267,7 @@ void Level::load() {
if (physicType.compare("Player") == 0){
float radius;
errorCheck(objectData->FirstChildElement("radius")->QueryFloatText(&radius));
radius *= objectScale*compScale;
this->physics.addPlayer(friction, radius, *object, mass, dampningL, dampningA, physicObjects.size());
}else if (physicType.compare("Box") == 0){
float width, height, length;