Solved [MATH/VELOCITY/VECTORS] How can I make JumpPads always boost up the Player?

Discussion in 'Plugin Development' started by OHQCraft, Aug 9, 2014.

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

    OHQCraft

    I want to make my LaunchPads always boost the Player up, but my current code doesn't do this unless their pitch is higher than 0. How can I do this? This is my current code:
    Code:java
    1. event.getPlayer().setVelocity(event.getPlayer().getLocation().getDirection().multiply(3));
    2. event.getPlayer().setVelocity(event.getPlayer().getVelocity().add(new Vector(0, 1, 0)));
     
  2. Offline

    Rocoty

    If you set the y position to 1 instead of adding 1 you should get the wanted result.
     
    OHQCraft likes this.
  3. Offline

    OHQCraft

    Thanks, that worked.
     
Thread Status:
Not open for further replies.

Share This Page