loc.getDirection() weirdness.

Discussion in 'Plugin Development' started by Jumla, Dec 3, 2012.

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

    Jumla

    So, I'm making a "far jump" plugin just for fun, and I'm having some trouble.

    Here's the code I'm using...

    Code:
    Vector direction = p.getLocation().getDirection().multiply(multiplyer * 3.5);
    direction = direction.setY(0.4);
    p.setVelocity(direction);
    So. Let me explain the problem. Essentially, when your just looking at air, it works great... however. when your looking at a block, it just pushes you a random direction (usually sideways)..
    How could I get this working? Thanks for any wisdom you can provide.
     
  2. Offline

    Barinade

    p.setVelocity(p.getEyeLocation().getDirection().multiply(4));
     
Thread Status:
Not open for further replies.

Share This Page