DGL
https://delphigl.com/forum/

newton collision tree
https://delphigl.com/forum/viewtopic.php?f=19&t=3392
Seite 1 von 1

Autor:  _Tux_ [ Fr Okt 22, 2004 12:13 ]
Betreff des Beitrags:  newton collision tree

hi.

im trying to test out the collision tree in newton with a simple face. my code seems ok but the balls still fall through it :(

Code:
  1.   Collider := NewtonCreateTreeCollision(NewtonWorld, nil);
  2.   NewtonTreeCollisionBeginBuild(Collider);
  3.  
  4.     V[0] := V3(-200, -200,  1.0);
  5.     V[1] := V3( 200, -200,  1.0);
  6.     V[2] := V3( 200,  200,  1.0);
  7.     V[3] := V3(-200,  200,  1.0);
  8.     NewtonTreeCollisionAddFace(Collider, 4, @V, SizeOf(TVector3f), 1);
  9.  
  10.   NewtonTreeCollisionEndBuild(Collider, 0);
  11.  
  12.   FloorBody := NewtonCreateBody(NewtonWorld, Collider);
  13.   Matrix_SetIdentity(FloorMatrix);
  14.   Matrix_SetTransform(FloorMatrix, V4(0, 0, 0));
  15.   NewtonBodySetMatrix(FloorBody, @FloorMatrix);
  16.   NewtonCollisionCalculateAABB(Collider, @FloorMatrix, @Min, @Max);
  17.   NewtonSetWorldSize(NewtonWorld, @Min, @Max);
  18.   NewtonReleaseCollision(NewtonWorld, Collider);


also, if i try to make a 200 by 200 by 1 box (this was the floor before i took a look at collision trees), when i render it in opengl the sizes are different :?

Autor:  Sascha Willems [ Fr Okt 22, 2004 16:34 ]
Betreff des Beitrags: 

See my answer in the newton forums, therefore I close this thread.

Seite 1 von 1 Alle Zeiten sind UTC + 1 Stunde
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/