Fixes repulsion/attraction and prevents things from flying off screen