Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Why this ain't working?

Comments in 'Plugin Development' started by Primus, Oct 28, 2015.

  1. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    PHP:
    // This is looped 20 times per second wile $this->lastRadius is equal to $this->radius (100)
    $r $this->lastRadius;
    $pitch $this->angle[0];
    $yaw $this->angle[1];

    $x = -sin($yaw 180 M_PI) * cos($pitch 180 M_PI) * $r;
    $y = -sin($pitch 180 M_PI) * $r;
    $z cos($yaw 180 M_PI) * cos($pitch 180 M_PI) * $r;

    echo 
    'X: '.$x."\n";
    echo 
    'Y: '.$y."\n";
    echo 
    'Z: '.$z."\n";
    echo 
    'Radius:'.$r."\n";
    echo 
    'Pitch: '.$pitch."\n";
    echo 
    'Yaw: '.$yaw."\n";
    echo 
    "______";
    $particle = new DustParticle($this->pos->add($x$y$z), $this->color[0], $this->color[1], $this->color[2]);
    $this->pos->level->addParticle($particle);

    $r++;
    $this->lastRadius $r;
    But the rocket (particles) are launched chaotic
  2. PmMc
    Offline

    PmMc New Member

    Joined:
    Aug 18, 2015
    Posts:
    3
    Minecraft User:
    PmServer
    Hay how to add particles Block Bedrock ?
  3. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    3 - 4 Line from bottom.
  4. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    # Bump
  5. zombie_Power
    Offline

    zombie_Power Active Member

    Joined:
    Sep 7, 2015
    Posts:
    239
    Minecraft User:
    Zombie_Power
    what do you mean by launched chaotic?
  6. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    No metter how i'm facing it will launch "rocket" somewhere else.
  7. zombie_Power
    Offline

    zombie_Power Active Member

    Joined:
    Sep 7, 2015
    Posts:
    239
    Minecraft User:
    Zombie_Power
    Do you understand trigonometry?
  8. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    Yes :p else i would'nt be posting this thread.

Share This Page

Advertisement