瀏覽代碼

Make the project compilable

DricomDragon 5 年之前
父節點
當前提交
bc6df5d41a
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      Car.cpp

+ 4 - 1
Car.cpp

@@ -92,9 +92,12 @@ void Car::jump( float32 correction )
 {
      // Jump
      b2Vec2 spring;
+     b2Vec2 forcePoint;
+
      spring.Set( 0.0f, -1.7f );
+     forcePoint.Set( 0.0f, 0.0f );
 
-     m_bodyCar->ApplyLinearImpulseToCenter( spring, true );
+     m_bodyCar->ApplyLinearImpulse( spring, forcePoint, true );
 
      // Correction
      m_bodyCar->ApplyAngularImpulse( - m_bodyCar->GetAngle() * correction, true );