make ending direction follow the path

This commit is contained in:
azureblue 2020-10-24 21:33:12 +02:00
parent ddbca62f92
commit 73a5af2e5e

View File

@ -1213,7 +1213,14 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
line.x = point.x;
line.y = point.y;
if(!overrideLineRotation || diagonal){
line.rotation = next != null ? Tile.relativeTo(point.x, point.y, next.x, next.y) : baseRotation;
if (next != null){
line.rotation = Tile.relativeTo(point.x, point.y, next.x, next.y);
}else if (block.conveyorPlacement && i > 0){
Point2 prev = points.get(i - 1);
line.rotation = Tile.relativeTo(prev.x, prev.y, point.x, point.y);
}else{
line.rotation = baseRotation;
}
}else{
line.rotation = rotation;
}