Solved [HELP] How to shoot a fireball towards a player

Discussion in 'Spigot Plugin Development' started by OscarDali, Jun 26, 2018.

Thread Status:
Not open for further replies.
  1. I'm trying to shoot a fireball from an armor stand towards a player, this is what I have so far.

    Code (Java):
    Fireball fire = armor.launchProjectile(Fireball.class);
                        Vector to = armor.getLocation().getDirection().normalize().multiply(2);
                        Vector from = e.getLocation().getDirection().normalize().multiply(2);
                        Vector loc = to.subtract(from);
                        fire.setVelocity(loc);
     
  2. Code (Text):
    Vector loc = armor.getLocation().toVector().subtract(e.getLocation().toVector());
    fire.setVelocity(loc);
     
  3. there are no spears towards the player, you throw them towards where the player is looking
     
  4. Have you even tried?
     
  5. Yes, I've tried many ways but I can not get it, although I'm also on how to fire a ball of fire towards where you are seeing an armorstand, do you know how to do this?
     
Thread Status:
Not open for further replies.