Topic category: Help with Minecraft modding (Java Edition)
I've been trying to figure out how to offset the spawn location of projectiles and particles based on the player's look angle and have been somewhat successful. So far I've managed to offset them forward, backwards, left and right using 2 different code blocks.
Forward and back is done using the following:
Left and right is done using the following:
I'm simply wondering if anyone knows the maths required to offset the particles/projectiles diagonally, and still be able to follow the player correctly as they turn, as this only seems to be possible so far with those 4 basic directions.
(also the images i attached aren't showing for some reason but if you copy the image address they'll open on imgur)