Skip to content

Commit

Permalink
Fix inverted placement pitch introduced in 92f00c6
Browse files Browse the repository at this point in the history
  • Loading branch information
cam72cam committed Dec 11, 2023
1 parent 49120c3 commit 385c32e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ public static ClickResult placeStock(Player player, Player.Hand hand, World worl
Vec3d rear = centerte.getNextPosition(center, VecUtil.fromWrongYaw(rearDistance, yaw));

moveable.setRotationYaw(VecUtil.toWrongYaw(front.subtract(rear)));
moveable.setRotationPitch(-VecUtil.toPitch(front.subtract(rear)) - 90);
float pitch = (-VecUtil.toPitch(front.subtract(rear)) - 90) % 180;
moveable.setRotationPitch(pitch);
System.out.println(pitch);

moveable.setPosition(rear.add(front.subtract(rear).scale(frontDistance / (frontDistance - rearDistance))));

ITrack frontte = ITrack.get(worldIn, front, true);
Expand Down

0 comments on commit 385c32e

Please sign in to comment.