   order in which physics is calculated
  Ive never used C++ so I dont quite understand whats happening in Jakobsen's "advanced character physics" paper. Ive got something working but I dont think its correct. What I dont understand is the other in which I have to do things as:1)create particles2)store initial positions3)start loop4)store positions in a temp variable etc..could someone just list the order in which things are stored and calculatedThanks for any help.    
  4. store pos in temp variables for all particles5. handle collisions by projection(repeat multiple times)6. move objects and update previous positions with temp variablesadmittedly my verlet system is unstable, but I'm pretty sure the order is right..   ;  I think it would be helpful for you to learn some of the underlying processes going on in your simulation.  Trying to create a physics system by studying some pseudo-code and some hacks to speed up certain aspects of a simulation without understanding anything about the whole process is just going to lead to problems.  When your sample code doesn't work correctly, you won't understand why.  When you need to add a feature, you won't know where to put it.Get yourself a good basic dynamics book.  That will give you great reference for what the terms are and what they mean.  Then  when you start trying to simulate them it will make more sense. Like what is the mass matrix and what does it do.To answer your basic question.  The order of a physical simulation is:1. Start with an object in it's current state (positions, velocity, mass).2. Apply forces that effect the object.  (Gravity, springs, user input, etc).3. Integrate the forces to change the velocity and position of the object.4. Make sure any constraints are satified such as collision interpenetration, link constraints, etc.  If there is a problem, adjust the positions and velocity to fix and go back to 3.5. If everything is happy, accept the step and move on to the next one, repeating to #2.Keep going until you stop.The Jakobsen paper is just one method to do 1-5.  There are many others but if you know what should be happening in each step, you can fix any problems.;  Thanks for the help. I understand whats going on in most of the program, but I just cant convert it into code. Ill give it a try soon with your order and see how it goes.   ;  I got the stick constraint working buts its not quite perfect. Due to the way the constraint works, the sick keeps shaking up and down slightly but rapidly. How do I overcome this so that it stays still if it's not moving too much? Where would I add the threshold?   