When part of a train is on a curve, the snapping points for adding a new wagon on the straight section no longer correspond to the position of the back wagon but have an offset.
For the mod I am developing wagons added to the back of the train via script based on the back_stock position do not always attach because of this. I can probably compensate for it if you don't want to fix it.
Train on curve, the snap point is offset and the wagons are intersecting
Train on straight track the snap point nicely matches the back of the train
[0.18.24] Rolling stock snapping offset when part of train on curve
-
- Long Handed Inserter
- Posts: 52
- Joined: Mon Aug 27, 2018 12:46 pm
- Contact:
Re: [0.18.24] Rolling stock snapping offset when part of train on curve
Hello, drawing trains on curves does some wild compensations for perspective shift, and sprites are shifted out of their center position. If you turn on collision rectangles in debug settings (F), you can see the last wagon is shifted back, and that's why it visually collides with building preview of the snapped wagon. That's minor visual issue.
But I don't think this is related to your issue with wagons not attaching when building them from stript. If you could provide small save and command I can run to reproduce the issue, that would be helpful. Thank you.
But I don't think this is related to your issue with wagons not attaching when building them from stript. If you could provide small save and command I can run to reproduce the issue, that would be helpful. Thank you.