Edit: This has been solved. I was dividing by zero, and is not a problem with SFML. My bad
I'm creating a flocking simulation based around
http://www.red3d.com/cwr/boids/. I'm getting a problem though.
The flocking is working fine, whatever, but when I try to make the boids wrap around (x position greater than the width, set width to 0 and vice versa), they flash where they should be but then are deleted. I'm using
sf::CircleShape shape(10.f);
shape.setPosition(sf::Vector2f(x,y));
but when the position is set far enough away from it's current position, it is deleted.
The same thing happened with a double pendulum simulation that I attempted yesterday. The physics were all broken which didn't make sense, but the thing would spin faster and faster until sfml just deleted the shapes. (the physics breaking is not the issue here, it's sfml deleting things)
Is there some way to specifically avoid having sfml delete things, or is there a way to turn it off entirely?