everyone. I'm having a little trouble with launching snowballs. I'm working on a plugin where, while a user is holding a snowball, they can sneak to charge a power bar. The player has a scoreboard in the side_bar that has a "power bar" that goes up and down from 1 to 10 while they are snaking. Once they right click to throw the snowball, it launches the ball at a velocity dependent on the users power level. A level of 5 is the default speed, a level of 10 is double the default speed, and a level of 1 is a fifth of the default speed, and the rest fill in that scale accordingly. I do this by multiplying the velocity by powerLevel/5.
This is all working splendidly. Well... kinda...
If the power level is 5 or above, it does what I expect it to do. However, if the power level is below 5 (slower than the default speed), the snowball just drops straight down. Is there a reason this happens? Can it be fixed? Any help on this would be great.
Thanks in advance!