Hi Sascha,
thanks for the comments.
I know about the most things with the physics. I was playing around with many different values which all have some "oddities" when it comes to buidling towers with the bricks. My biggest problem was, that Newton caused the bricks to "wobble" on each other after they are placed, so you were not able to build towers higher than lets say 3 or 4 bricks.
I eliminated this "problem" by setting a quite high autofreeze treshold, which also causes those "impossible" situations you have shown. But the bricks are not "wobbling" anymore.
I think I have to make some compromises here between physical simulation and gameplay. Its just the basic engine now, not the final game. And I know that tweeking is necessary, but I have to dig a little deeper into Newton when the rest of the gameplay is working.
I use quite high gravity, which lets the bricks fall quite fast... I will take a look at different speeds (CPUs) later if the behaviour is varying on faster PCs... At the moment I can just tell that its running ok on my machine...
Greetings,
Dirk
Edit: And yes, I calculate inertia with Newtons functions:
Code:
NewtonConvexCollisionCalculateInertialMatrix(Collision, @Inertia.x, @Origin.x);
Ixx := Mass * Inertia.x;
Iyy := Mass * Inertia.y;
Izz := Mass * Inertia.z;
NewtonBody := NewtonCreateBody(TGameEngine(GameEngine).NewtonWorld, Collision);
NewtonBodySetCentreOfMass (NewtonBody, @Origin.x);
NewtonBodySetMassMatrix (NewtonBody, Mass, Ixx, Iyy, Izz);
Bookmarks