Crafting Dead Modpack

Crafting Dead Modpack

111k Downloads

The Gun Crosshair doesn't seem to matter.

bS-ui opened this issue ยท 2 comments

commented

When shooting guns from the hip, the crosshair that appears and gets larger or smaller depending on how you move doesn't seem to matter at all. When you shoot it just hits the center dot and nothing in the surrounding area.

(Video is inside of the ZIP, couldn't upload the MP4 itself)
2020-11-11 19-13-41.zip

Haven't tested with every single gun individually again but I'm pretty sure this applies to all guns.

commented
  1. .rayTrace(entity, 100, 1.0F, this.getAccuracy(living, itemStack) * 1.5F, random)
  • 1.5F on that line makes the accuracy pretty much always perfect
  1. if (accuracy < 1.0F) {
    look = look
    .add(
    (1.0F - accuracy) / 7.5F * random.nextFloat() * (random.nextBoolean() ? -1.0F : 1.0F),
    0, (1.0F - accuracy) / 7.5F * random.nextFloat()
    * (random.nextBoolean() ? -1.0F : 1.0F));
    }

    This spread calculation seems very weird, maybe it's simpler to implement it using pitch/yaw?
    At the very least look vector's values could become > 1 and < -1, which will probably lead to unexpected ray trace behavior.
commented

Fixed in 4879597