It shows the locomotives heading backwards when I take the blueprint and rotate it 180 degrees.
Screenshot 2024-11-23 191457.png (440.01 KiB) Viewed 1662 times
Re: [2.0.21] Locomotives shown heading wrong direction on blueprint when rotated.
Posted: Sat Nov 23, 2024 5:10 pm
by eugenekay
How are you rotating the blueprint, specifically?
I was not able to reproduce this behavior using the Blueprint String provided, also on 2.0.21, using the R button to Rotate, or Shift-H / Shift-V to flip Horizontal / Vertical.
Screenshot 2024-11-23 121023.png (1.46 MiB) Viewed 1652 times
Re: [2.0.21] Locomotives shown heading wrong direction on blueprint when rotated.
Posted: Sat Nov 23, 2024 6:16 pm
by ElderAxe
I checked again and noticed that it works when you import the string.
Here it the steps to reproduce:
- Import the string.
- Place the blueprint on to the world
- Create a new blueprint/update existing blueprint with the previously placed tracks including the trains.
- Save the blueprint
- This new blueprint will have this rotating issue.
Re: [2.0.21] Locomotives shown heading wrong direction on blueprint when rotated.
Posted: Sat Nov 23, 2024 6:22 pm
by robot256
Confirmed with the new steps on 2.0.21. Note that *placing* the blueprint with backwards-drawn locomotives results in *ghosts* that are rotated correctly, and the locomotives are placed correctly by the bots.
Re: [2.0.21] Locomotives shown heading wrong direction on blueprint when rotated.
Posted: Wed Dec 04, 2024 7:30 pm
by ElderAxe
I believe this is same bug as locomotives but wanted to mention this too. This one happens when the train is in stopped position. (Manual or at the station)
Screenshot 2024-12-04 180508.png (260.32 KiB) Viewed 1498 times
Steps to reproduce:
- Place this blueprint.
- Let the train arrive at the station.
- Create a new blueprint with Alt+B and select everything (entities, station, trains, fuel)
- Get the new blueprint at your hand.
- Flip it 180 degrees.
Re: [boskid][2.0.21] Locomotives shown heading wrong direction on blueprint when rotated.
Posted: Fri Mar 28, 2025 1:15 pm
by boskid
Thanks for the report. This issue is now fixed for 2.0.44.
Being able to reproduce this was really helpful as this is what allowed me to identify root of the issue. Rolling stocks can have their position and orientation set by 2 competing means: one is by position of front and back joints, and second is by the entity's position and orientation. Blueprint preview was correctly setting the locomotive's orientation but the issue was that this locomotive also had joints attached to the underlying rails and drawing takes orientation based on joints position as a priority. When joints are exactly overlapping, the resulting orientation happened to be east. Those locomotives are placed exactly so that they span 2 full rails and joints(wheels) are exactly at the far edges of 2 rail pieces, however when blueprint was rotated, since horizontal and vertical rails keep their direction while rails relative position swaps, 2 joints that were far apart now tried to render on the same screen position. You may actually notice this artifact if you look closely: in the faulty case, every second fluid wagon has traces of wheels rendering exactly in the center of a rolling stock, and other half has wheels at the correct position because they happened to be exactly on the center of the rails where the blueprint rotation does not affect them. This also explains the other cases where rolling stocks are inconsistently shifted forward and backward and they are also fixed here. Fix is basically that when rolling stock is asked to change its orientation, that means the orientation should be now used when drawing (not the joints) so i detach such rolling stock from rails and this fixes the problem.