In vanilla, all throwable projectiles (snowballs, eggs, ender pearls, wind charges) have a small random offset applied to their trajectory on each axis using a triangular distribution (random.triangle(0, 0.0172275)). Dragonfly currently fires all throwables in an exact straight line with no spread.
The vanilla algorithm (per the wiki):
- Get the unit facing vector of the player (with a per-item pitch offset)
- For each axis, add a random value in
[-0.0172275, 0.0172275] using a triangular distribution
- Scale the result by the item's POWER
4. Add the player's velocity (Y component unaffected if the player is on ground (java only)
Affected items: Snowball, Egg, EnderPearl, WindCharge, and Bow/Crossbow
This would look like this
const spread = 0.0172275
vel = vel.Add(mgl64.Vec3{
spread * (rand.Float64() - rand.Float64()),
spread * (rand.Float64() - rand.Float64()),
spread * (rand.Float64() - rand.Float64()),
})
In vanilla, all throwable projectiles (snowballs, eggs, ender pearls, wind charges) have a small random offset applied to their trajectory on each axis using a triangular distribution (
random.triangle(0, 0.0172275)). Dragonfly currently fires all throwables in an exact straight line with no spread.The vanilla algorithm (per the wiki):
[-0.0172275, 0.0172275]using a triangular distribution4. Add the player's velocity (Y component unaffected if the player is on ground(java only)Affected items:
Snowball,Egg,EnderPearl,WindCharge, andBow/CrossbowThis would look like this