Lasers fired from turtles originate a block lower than they should when pitch is 180
WindClan opened this issue ยท 4 comments
Eve's suggestion is to perform a single-step raycast to find where the laser leaves the block, then add a little extra offset along the ray
You probably don't need to ray trace - just project it ~0.7 blocks away from the middle of the turtle.
So this happens from pitch angles 61 to 180 due to this logic (specifically line 66):
Seeing that condition you'd then expect that it's possible to launch the projectile a block above the turtle, but it's never reached due to Utils.mod
always coercing values to be positive (used to normalize pitch):
Plethora-Fabric/src/main/java/io/sc3/plethora/util/Helpers.java
Lines 25 to 48 in 7e59a36
working on a fix for it rn that better handles the laser placement