Relative Content

Tag Archive for c++simulationsfmlphysics

How to get stable collisions using verlet intergration?

I have been working on this simple physics system for a while and i originaly started with euler physics but couldn’t manage to get stable collisions working and after switching to verlet integration i still cant get anything stable. It works completely fine when there is not enough balls to stack on top of each other but as soon as i add more balls and they land ontop of eachother they start flying off and its chaotic. you can see the full code and just the specific collision function below and im using C++ and sfml.