Skip to content

Commit 5a5a6ec

Browse files
committed
Fix startup bumpiness
1 parent 4ab9913 commit 5a5a6ec

1 file changed

Lines changed: 6 additions & 11 deletions

File tree

src/main/java/trackapi/compat/MinecraftRail.java

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,17 @@ public Vec3d getTrackCenter() {
6868
case ASCENDING_WEST:
6969
return new Vec3d(0.5, 0.5, 0.5);
7070
case EAST_WEST:
71-
return new Vec3d(0.5, 0, 0.5);
71+
return new Vec3d(0.5, 0.1, 0.5);
7272
case NORTH_EAST:
73-
return new Vec3d(0.75, 0, 0.25);
73+
return new Vec3d(0.75, 0.1, 0.25);
7474
case NORTH_SOUTH:
75-
return new Vec3d(0.5, 0, 0.5);
75+
return new Vec3d(0.5, 0.1, 0.5);
7676
case NORTH_WEST:
77-
return new Vec3d(0.25, 0, 0.25);
77+
return new Vec3d(0.25, 0.1, 0.25);
7878
case SOUTH_EAST:
79-
return new Vec3d(0.75, 0, 0.75);
79+
return new Vec3d(0.75, 0.1, 0.75);
8080
case SOUTH_WEST:
81-
return new Vec3d(0.25, 0, 0.75);
81+
return new Vec3d(0.25, 0.1, 0.75);
8282
default:
8383
return null;
8484
}
@@ -102,11 +102,6 @@ public Vec3d getNextPosition(Vec3d currentPosition, Vec3d motion) {
102102
newPosition = newPosition.add(trackMovement.scale(trackPosMotionInverted ? -distanceToCenter : distanceToCenter));
103103
// Move new pos along track alignment
104104
newPosition = newPosition.add(trackMovement.scale(trackMotionInverted ? -motion.lengthVector() : motion.lengthVector()));
105-
// Bump off the ground a bit
106-
newPosition = newPosition.addVector(0, 0.1, 0);
107-
if (newPosition.distanceTo(currentPosition) > motion.lengthVector()*2) {
108-
System.out.println(newPosition.distanceTo(currentPosition));
109-
}
110105
return newPosition;
111106
}
112107

0 commit comments

Comments
 (0)