Rotate parameter for physics.add should now be false if the object has a positionConstraint.
This commit is contained in:
parent
5eb3aed1ce
commit
c1c0cc2881
5
level.cc
5
level.cc
@ -254,7 +254,8 @@ void Level::load() {
|
||||
float mass;
|
||||
errorCheck(xmlObject->FirstChildElement("mass")->QueryFloatText(&mass));
|
||||
float dampningL, dampningA;
|
||||
bool rotate = true;
|
||||
XMLElement* constraint = thisComposition->FirstChildElement("positionConstraint");
|
||||
bool rotate = (constraint == NULL);
|
||||
errorCheck(objectData->FirstChildElement("dampningL")->QueryFloatText(&dampningL));
|
||||
errorCheck(objectData->FirstChildElement("dampningA")->QueryFloatText(&dampningA));
|
||||
if (physicType.compare("Player") == 0){
|
||||
@ -417,7 +418,7 @@ void Level::load() {
|
||||
XMLElement* positionConstraint = composition->FirstChildElement("positionConstraint");
|
||||
for(; positionConstraint; positionConstraint=positionConstraint->NextSiblingElement("positionConstraint")){
|
||||
float xPos, yPos, zPos, strength;
|
||||
int objectNum, idGreen, idBlue, objectIndex;
|
||||
int objectNum=0, idGreen=0, idBlue=0, objectIndex=0;
|
||||
errorCheck(positionConstraint->FirstChildElement("xPosition")->QueryFloatText(&xPos));
|
||||
errorCheck(positionConstraint->FirstChildElement("yPosition")->QueryFloatText(&yPos));
|
||||
errorCheck(positionConstraint->FirstChildElement("zPosition")->QueryFloatText(&zPos));
|
||||
|
Loading…
Reference in New Issue
Block a user