Started by
Grimlock
on
Topic category: Help with Minecraft modding (Java Edition)
I've already got my weapon to shoot wither skulls, but I want them to shoot in the direction I'm looking in. Any way to do this?
Edited by Grimlock on Fri, 08/05/2022 - 19:42
Bump
I guess the simplest method would be to override the motion vector of the skull based on the direction the player is facing. (Their 'Yaw.') I've done something sort of like this before, but it only required eight directions, so I just checked whether the yaw was within a certain range, and launched the player in a direction accordingly- if you want your weapon to be more precise, it'll be trickier.
...I guess I recommend tinkering with look-angle vectors? I'm not entirely sure. Alternatively, you could make a projectile weapon with a custom projectile that looks and behaves like a wither skull, exploding and inflicting wither in a radius on impact.