[boskid][2.0.21] Locomotives shown heading wrong direction on blueprint when rotated.

Bugs which we just recently fixed in our development version and will reach you in the next release.
ElderAxe
Fast Inserter
Fast Inserter
Posts: 162
Joined: Thu May 18, 2017 8:04 am
Contact:

[boskid][2.0.21] Locomotives shown heading wrong direction on blueprint when rotated.

Post by ElderAxe »

Screenshot 2024-11-23 191627.png
Screenshot 2024-11-23 191627.png (2.46 MiB) Viewed 491 times
This is the blueprint for the image above.


It shows the locomotives heading backwards when I take the blueprint and rotate it 180 degrees.
Screenshot 2024-11-23 191457.png
Screenshot 2024-11-23 191457.png (440.01 KiB) Viewed 491 times
eugenekay
Filter Inserter
Filter Inserter
Posts: 310
Joined: Tue May 15, 2018 2:14 am
Contact:

Re: [2.0.21] Locomotives shown heading wrong direction on blueprint when rotated.

Post 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
Screenshot 2024-11-23 121023.png (1.46 MiB) Viewed 481 times
ElderAxe
Fast Inserter
Fast Inserter
Posts: 162
Joined: Thu May 18, 2017 8:04 am
Contact:

Re: [2.0.21] Locomotives shown heading wrong direction on blueprint when rotated.

Post 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.
robot256
Smart Inserter
Smart Inserter
Posts: 1120
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: [2.0.21] Locomotives shown heading wrong direction on blueprint when rotated.

Post 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.
ElderAxe
Fast Inserter
Fast Inserter
Posts: 162
Joined: Thu May 18, 2017 8:04 am
Contact:

Re: [2.0.21] Locomotives shown heading wrong direction on blueprint when rotated.

Post 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
Screenshot 2024-12-04 180508.png (260.32 KiB) Viewed 327 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.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3754
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [boskid][2.0.21] Locomotives shown heading wrong direction on blueprint when rotated.

Post 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.
Post Reply

Return to “Resolved for the next release”