Location in front of somebody

Discussion in 'Plugin Development' started by wouterrr, Mar 8, 2014.

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

    wouterrr

    Hi there,

    I'm searching for a way to get the location in front of someone. So like 2 blocks away from his eyelocation. Actually the camera location in the f5 mode would be nice.

    Example: http://prntscr.com/2yydt9

    I hope someone can help me.

    Thanks
     
  2. Offline

    tamajpm

    You can make a location variable with the eye location from the player as a value and substract 2 or more from the location with .substract(x, y, z);.
     
  3. Offline

    wouterrr

    tamajpm Yeah but I must know then whether to subtract the x or the z...
     
  4. Offline

    tamajpm

    After the .getLocation(); you do .getDirection();.
     
Thread Status:
Not open for further replies.

Share This Page