Sfoglia il codice sorgente

2d physics entity scale is now forced to be positive to avoid issues with negative scale in box2d

Ivan Safrin 12 anni fa
parent
commit
43b17652bb

+ 2 - 0
Modules/Contents/2DPhysics/Source/PolyPhysicsScreenEntity.cpp

@@ -39,6 +39,8 @@ PhysicsScreenEntity::PhysicsScreenEntity(ScreenEntity *entity, b2World *world, N
 	Matrix4 compoundMatrix = screenEntity->getConcatenatedMatrix();
 	entity->ignoreParentMatrix = true;
 	entity->scale = entityScale;
+	entityScale.x = fabs(entityScale.x);
+	entityScale.y = fabs(entityScale.y);
 	this->worldScale = worldScale;
 	collisionOnly = false;