[2.0.21] Existence of LuaGuiElement with type "camera" can cause rails to be placed incorrectly
Posted: Sat Nov 23, 2024 11:13 pm
Commiserations for the bizarre bug report, but as far as I can tell it is true.
If a mod has created a LuaGuiElement of type "camera" which is currently active/visible, the rail planner behaves erratically. Roughly, it seems as though the rail creation logic believes the mouse cursor is somewhere other than where it actually is, although the preview behaves correctly. So you get nonsensical errors about placement collisions even though the rail preview is green, and when you do manage to place some rails they appear in a completely different configuration than you expected.
The behaviour seems to depend to some extent on the position and scale of the custom camera, perhaps relative to the player's actual position? I am not sure, but sometimes things work OK even when the camera is open, it seems to depend on if I'm physically close to the area the camera is showing or not. If you close the custom mod camera the rail planner starts working as usual again.
I have attached two files:
* A save file you can load up and you'll be standing next to some rails with a camera open, trying to place some rails will show the bug
* A video of me doing exactly that
If a mod has created a LuaGuiElement of type "camera" which is currently active/visible, the rail planner behaves erratically. Roughly, it seems as though the rail creation logic believes the mouse cursor is somewhere other than where it actually is, although the preview behaves correctly. So you get nonsensical errors about placement collisions even though the rail preview is green, and when you do manage to place some rails they appear in a completely different configuration than you expected.
The behaviour seems to depend to some extent on the position and scale of the custom camera, perhaps relative to the player's actual position? I am not sure, but sometimes things work OK even when the camera is open, it seems to depend on if I'm physically close to the area the camera is showing or not. If you close the custom mod camera the rail planner starts working as usual again.
I have attached two files:
* A save file you can load up and you'll be standing next to some rails with a camera open, trying to place some rails will show the bug
* A video of me doing exactly that