Miloslav Číž 4 лет назад
Родитель
Сommit
966bb88096
2 измененных файлов с 6 добавлено и 2 удалено
  1. 1 1
      test_sdl.c
  2. 5 1
      tinyphysicsengine.h

+ 1 - 1
test_sdl.c

@@ -202,7 +202,7 @@ int main()
   sphere1.position.x = -700;
 
 sphere1.position.y = 200;
-sphere1.position.z = 200;
+sphere1.position.z = 300;
 
   sphere2.shape = TPE_SHAPE_SPHERE;
   sphere2.shapeParams[0] = 512; 

+ 5 - 1
tinyphysicsengine.h

@@ -502,6 +502,10 @@ void TPE_bodyApplyVelocity(TPE_Body *body, TPE_Vec4 point, TPE_Vec4 velocity)
 
   TPE_Unit pointDistance = TPE_vec3Len(point);
 
+TPE_PRINTF_VEC4(point);
+TPE_PRINTF_VEC4(velocity);
+printf("\n");
+
   if (pointDistance != 0)  
   {
     /* normalize the point, we don't use the function as we don't want to    
@@ -898,7 +902,7 @@ TPE_Vec4 TPE_vec3Minus(TPE_Vec4 a, TPE_Vec4 b)
 {
   a.x -= b.x;
   a.y -= b.y;
-  a.z -= a.z;
+  a.z -= b.z;
 
   return a;
 }