Periodic boundaries working for all movement types