fixed spring and attraction in 3d + optimisations