Help! Shoot arrow in 3 directions!

Discussion in 'Spigot Plugin Development' started by Clyx, Jun 12, 2015.

  1. Hello guys I'm making a minigame but I'm a little bit stucked ..

    I want to shoot arrows in 3 directions!
    I mean : When a player use the bow it will shoot 3 arrows in differents direction, But I would like to be able to detect if one of these arrow hit a player and retrieve the shooter.

    I made a little picture to explain :
    [​IMG]
    So as you can see the black arrows are the direction of the shooted arrow from the player!

    If anyone could help me, would be greatly appreciated.

    Clyx.
     

    Attached Files:

  2. @Clyx Player#launchProjectile(Class<T extends Projectile> c) is all you need.
     
  3. Get the player's viewing direction as a vector, add some to move it side to side, set the projectile velocity as that vector.
     
  4. Yes this I what i wanted to do in my head, but I don't know how to "move it side by side" any example?
     
  5. I know how to launch projectiles, I just want to launch them in 3 directions ^^
     
  6. I have to add to X and Z ? ..
     
  7. That's what I'd try. Sorry I can't be of more help, on phone :/
     
  8. Hum okay thank you, i will make some test ;)