MineInAbyss / Mobzy

Config-driven custom mobs for Spigot using ECS
https://mineinabyss.com/Mobzy/
MIT License
41 stars 8 forks source link

Projectile accuracy #46

Closed Norazan closed 3 years ago

Norazan commented 3 years ago

Closes #40

@0ffz Functionality pretty much finished, just a couple of things I'd like you opinion on.

Should the shootDirection function in ProjectileHelpers maybe just go in ThrowItemsGoal? Not sure if it makes sense to have another file for it, unless we want to use this function in multiple places (I can't imagine that though).

Shall I move Double.toRadians() to some kind of MathHelper file? I can see this being useful in more situations.

What do you think about this? Instead of using a uniform random distribution for the projectile accuracy, we could use a gaussian distribution. This makes it more likely that the projectile is aimed at the target, instead of to the sides (even within a random range). If we want true randomness of the projectile direction we should use a uniform distribution though.

Is the parameter name projectileRandomAngle to indicate accuracy fine?