Multi-arrow instant bow with exact spread

Started by flaffa on

Topic category: Help with modding (Java Edition)

Last seen on 14:18, 5. Jan 2024
Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Multi-arrow instant bow with exact spread

Hello!
I am trying to create an instant bow (like the old "machine-gun" bow) that fires three arrows, side-by-side.

I've gotten the three arrows to fire, but it only works as intended when I fire northeast and southwest.
Any other direction and the arrows begin to lose their horizontal spread, eventually firing in a straight line when I reach northwest and southeast.
Also, when I fire looking up, the vertical spread shifts.

What I want is for the arrows to always fire in a row.

I don't have much Java experience, so if I can do this without coding, that'd be great.

Thank you!

Last seen on 14:18, 5. Jan 2024
Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I almost forgot - here's the…
Thu, 01/04/2024 - 16:53

I almost forgot - here's the current procedure. I assume I'm missing something to make it work?

Last seen on 14:18, 5. Jan 2024
Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
FYI - I know (at least i…
Thu, 01/04/2024 - 19:38

FYI - I know (at least i think I know) what's going on -
It's happy when I'm looking in a certain direction, and spreads the arrows- but doesn't like when I look in other directions as it follows the planes (x,y,z) and will try to spread the arrows on the z-axis but as I'm firing along the z-axis, it doesn't spread at all.

Last seen on 08:30, 6. Apr 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
YO, maybe try with…
Sat, 04/06/2024 - 08:25

YO, maybe try with multiplications of the X and Z value of look vector with 0.05 and -0.05.