-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle arrow shooting (#101) #121
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #121 +/- ##
===========================================
+ Coverage 57.96% 58.76% +0.79%
===========================================
Files 59 60 +1
Lines 8017 8230 +213
===========================================
+ Hits 4647 4836 +189
- Misses 3370 3394 +24
Continue to review full report at Codecov.
|
For spawning the arrow, I recommend adding a method to |
Yes, I was thinking of making a |
Yes, that seems right. You might want to consider how you could generalize |
Seems like the velocity is overflowing when being sent to clients. |
Sorry, accidental close |
So I'm not too sure, but it seems like the scale of velocity is very different for items and arrows. I packet-logged Spigot and saw velocity values in the thousands. According to https://wiki.vg/Protocol#Entity_Velocity, it should be pretty normal to get very high velocity values since it's measured in 1/8000th of blocks per tick. Why the values are so much smaller for items is unclear to me. |
The velocity value on Feather is in blocks per tick. The |
The thing is |
Ah... so (Now I know what's causing entities to jitter on the client...) |
I will merge develop into this branch and adjust the velocity. |
Ready for review/merge. |
Also, physics aren't being applied to arrows on the server side because they don't have a bounding box ( |
…row in front of player
I added a bounding box and made the arrow spawn 1.5 blocks in front of the player. However, it seems like the arrow breaks off its course after a few blocks and falls down. Seems like something is off with the physics impl? |
Yes, |
Cool. Is there a value set for the "gliding" effect when the entity is blocked? Arrows should do a full-stop when colliding with a block. |
That's not implemented yet, but you could just set That won't work when the arrow hits a wall—only when it impacts the ground. A more robust solution would be to add an |
Thanks! |
#101