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: Collider := NewtonCreateTreeCollision(NewtonWorld, nil); NewtonTreeCollisionBeginBuild(Collider); V[0] := V3(-200, -200, 1.0); V[1] := V3( 200, -200, 1.0); V[2] := V3( 200, 200, 1.0); V[3] := V3(-200, 200, 1.0); NewtonTreeCollisionAddFace(Collider, 4, @V, SizeOf(TVector3f), 1); NewtonTreeCollisionEndBuild(Collider, 0); FloorBody := NewtonCreateBody(NewtonWorld, Collider); Matrix_SetIdentity(FloorMatrix); Matrix_SetTransform(FloorMatrix, V4(0, 0, 0)); NewtonBodySetMatrix(FloorBody, @FloorMatrix); NewtonCollisionCalculateAABB(Collider, @FloorMatrix, @Min, @Max); NewtonSetWorldSize(NewtonWorld, @Min, @Max); 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
|