ソースを参照

Minor fix to getGravity function signature (removed random extra parameter).
Fixes recently added SpriteBatch draw function to draw sprites using the given position as the center.

Chris Culy 14 年 前
コミット
f03e69b185

+ 1 - 1
gameplay/src/PhysicsController.cpp

@@ -109,7 +109,7 @@ PhysicsSpringConstraint* PhysicsController::createSpringConstraint(PhysicsRigidB
     return constraint;
 }
 
-const Vector3& PhysicsController::getGravity(const Vector3& gravity) const
+const Vector3& PhysicsController::getGravity() const
 {
     return _gravity;
 }

+ 1 - 1
gameplay/src/PhysicsController.h

@@ -173,7 +173,7 @@ public:
      * 
      * @return The gravity vector.
      */
-    const Vector3& getGravity(const Vector3& gravity) const;
+    const Vector3& getGravity() const;
 
     /**
      * Sets the gravity vector for the simulated physics world.

+ 2 - 2
gameplay/src/SpriteBatch.cpp

@@ -250,8 +250,8 @@ void SpriteBatch::draw(const Vector3& position, const Vector3& right, const Vect
 {
     // Calculate the vertex positions.
     Vector3 p[4];
-    p[0] = position - 0.5f * width * right;
-    p[1] = position + 0.5f * width * right;
+    p[0] = position - 0.5f * width * right - 0.5f * height * forward;
+    p[1] = position + 0.5f * width * right - 0.5f * height * forward;
     p[2] = p[0] + height * forward;
     p[3] = p[1] + height * forward;