I understand, for the most part, how to create a helix based on a players current location. I have been doing loads of research about rotating that helix based on a players yaw and pitch and found nearly nothing on that. Anyone able to help?
Still have not been able to find the answer. Any references to where I can find help would be lovely.
Okay well a quick google search brings me to this page, which I assume you have seen since you have "been doing loads of research" https://bukkit.org/threads/creating-a-helix-3d-spiral-out-of-particles.314312/ How exactly would a player yaw/pitch affect the helix?
I have been to this page several times, I understand how to make a helix, but not how to incorporate yaw and pitch in order to rotate it to the players looking direction.
https://pastebin.com/Sfd0T6D5 I have this so far, but this does the OPPOSITE of work. Any help is MUCH appreciated!
This has really interested me and I'm going to look deeper into it. I think that the pitch wont be too complicated because that only affects the Y coordinate but the pitch will be harder because it affects the X and Z coordinate. I'll reply again when I have done some maths and stuff.
in your code, You have a for loop and inside it you spawn the particle of the helix. Does this spawn all of them at once at the end of the method or do you see the particles spawning one by one?
It spawns them one at a time, but since it is a for loop it spawns too fast for you to be able to tell.
Yeah i sorted that, You have to run the method asyncrously, so basically in a BukkitRunnable then use runTaskAsynchronously, then in the for loop use Thread.sleep(50) to give a space between each spawn. One thing I still can't manage is to get the "helix" travel in the direction the player is facing, I have spent a lot of time on it and it's really a tough problem. If you have discord I'd like to share my work so far with you. (I've done alot of trigonometry work on paper and it seems like it should work but when i put it into mc it just doesn't and i can't understand why..)
Issue STILL not solved. Current code: https://hastebin.com/anomililev.java Almost works but does not work when looking certain directions. ANY help is MUCH appreciated!
I don't see any reason why the method should be static and why you use Thread.sleep() instead of repeating task that changes the values every iteration.. But, did you take a look at Sin & Cos, Radians, Sphere, Polygon, Rotation, Lines ?
Theee tutorials are certainly the best, they helped me get through learning how to rotate my helix effect, if you’d like help (I’ve got the code for this pm me and I’ll guide you through it) however I won’t be in until later
I'm not that good at math but i decided to play with particles a bit and wrote this. It makes rainbow rotating particle line(s), you can use it if you want.. You could also add min&max radius and have it shrink/expand from start to end or in some shape.. But keep in mind that those calculations are heavy.