Spawning particles around player

Discussion in 'Plugin Development' started by Konkz, Apr 15, 2014.

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

    Konkz

    Hey,

    so for one of the features in my plugin there will be an item that spawns with particles that spawn around it. For now, I am trying to get the particles to spawn around player in a 'circle' type, whereas whenever I attempt to do it then it always goes bit off a circle shape, and I no longer am in the middle of it.

    [​IMG]

    I've attempted multiple ways of going against this problem, this is the latest code I've used:
    Code:java
    1. Location l = p.getLocation();
    2.  
    3. //loop to make a circle of fire
    4. for (double t = 0; t < 2 * Math.PI; t += 0.39) {
    5. p.getWorld().playEffect(l.add(1 * Math.cos(t), 0, 1 * Math.sin(t)), Effect.SMOKE, 4);
    6. }


    EDIT
    I've attempted to use this method now, but still failed as I can't get it to spawn all locations in a circle but only on one spot.
    https://forums.bukkit.org/threads/util-getting-circle-locations.175278/
     
Thread Status:
Not open for further replies.

Share This Page