Solved Help with rotating particles

Discussion in 'Plugin Development' started by Krimbo_, Jan 15, 2021.

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

    Krimbo_

    hi, im making a plugin that show effects with particles, in a specific effect i need a semi-circle in the horizontal that follow the player direction, i already do the part of the semi-circle but he dont follow player looking direction, can anyone help me?

    i want the semi-circle look like this:
    [​IMG]

    but he stay in just 1 direction:
    [​IMG]

    this is my current code:

    new BukkitRunnable() {
    double phi = 0;
    @Override
    public void run() {
    phi += Math.PI/15;
    for(double th = 0; th <= 1* Math.PI; th += Math.PI/30) {
    double x = radius*Math.cos(th);
    double z = radius*Math.sin(th);
    loc.add(x, 0, z);
    loc.getWorld().spawnParticle(Particle.CLOUD,loc,0, 1, 0, 5, 0);
    loc.subtract(x, 0, z);
    }
    this.cancel();
    }
    }.runTaskTimer(Main.getInstance(), 1, 1);

    solved

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jan 15, 2021
  2. Offline

    soshimee

    Curious, how did you solve this? I thought particles were non-rotatable.
     
Thread Status:
Not open for further replies.

Share This Page