Velocity

Discussion in 'Plugin Development' started by darkmage0252, Dec 5, 2011.

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

    darkmage0252

    How do i use velocity?
    I want to know how to control arrow velocity/snowball/eggs/mobs
     
  2. Offline

    r3Fuze

    If you want to increase the speed of an array you could do something like this:
    Code:java
    1. Arrow arrow = player.shootArrow();
    2. arrow.setVelocity(arrow.getVelocity().multiply(3.0));

    That would make player shoot an arrow with 3x normal speed.
    I dont know how to curve arrows though. I can only imagine it would be very hard.
     
  3. Offline

    L3N

    I guess you can do:
    Code:java
    1. Arrow arrow = player.shootArrow();
    2. arrow.setVelocity(new Vector(x, y, z));


    But I'm not sure.
     
  4. Offline

    xTigerRebornx

    L3N
    Code:
    Player arrow = player.shootArrow();
    Heh...."Player arrow"
     
    Th3Br1x likes this.
  5. Offline

    Chinwe


    Are you aware this thread is over 2 years old? :confused:
     
    Th3Br1x likes this.
  6. Offline

    L3N

    loooooooool

    Yea I saw.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 22, 2016
    Th3Br1x likes this.
  7. Offline

    Th3Br1x

    This just make me cry due to laughing ._.
     
Thread Status:
Not open for further replies.

Share This Page