Hello Ihor,
glad to hear this worked. Please note that as of the last release the swapping of X and Y has been fixed, see the release notes: Release of FLUKA 4-5.1. When you update FLUKA, I suggest you look at your source again to confirm that everything is working as you intend.
Stefano