1.15.2 particle rotation

Discussion in 'Plugin Development' started by LuciBytes, Jun 6, 2020.

Thread Status:
Not open for further replies.
  1. Offline

    LuciBytes

    So I have a star displaying under the player using 3D Vector Points. When trying to rotate the points, they either merge into one, go into a long line in the distance, or display the star weirdly. I'd like the points to constantly rotate under the player, so that the star is under the player rotating. I'm using this for a magic server, so when you go /home the star will display under you, rotate for five seconds while you stand still and then you go home.

    The star being created and my attempt(s) at rotating it. The star can display properly, it can be rotated based on player yaw, but I can't get it to rotate without it being based on player movement.

    Point3D class

    Bump

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2020
  2. Offline

    LuciBytes

  3. Offline

    bowlerguy66

    Have you confirmed all of your math works correctly for your Point3D class? Whenever I work with trig I always plug in numbers that I have already solved for just to check that the code will give the right answer.
     
  4. Offline

    LuciBytes

    The star displays perfectly, until I attempt to rotate it
     
  5. Offline

    bowlerguy66

    Right, have you plugged in some base values, like Point3D(0, 0, 1), and then tried to rotate it 90° and see what it says? Also, one concern I have with the Point3D class is that you don't supply what the point is being rotated around, so you'll get some weird values.
     
  6. Offline

    LuciBytes

    I got some help from a different forum that instructed me to use Vectors instead of the bulky Point3D thing I was using. Granted, it is more efficient, but I have no idea how to use it. Sine there's API for rotateAroundY. But that has given me a 4 point "star" shape that is more of a diamond, and I have no idea if I can add more points and/if I can make it rotate 360 degrees whilst its under the player
     
  7. Online

    timtower Administrator Administrator Moderator

    Then please post your updated code.
     
  8. Offline

    LuciBytes

    Updated code, completely removed the Point3D class and the usage of it.
     
Thread Status:
Not open for further replies.

Share This Page