Fixed the weird bug with physics, was my fault for dividing the height by i, instead of dividing by number of times and multiplying by i. This made the bug appear.