[MOVED]Moving an entity at the playerEyeLocation

Discussion in 'Programming' started by TheL0w3R, May 30, 2016.

Thread Status:
Not open for further replies.
  1. Hi'm i'm coding a Harry Potter plugin, currently coding the spell Wingardium Leviosa(for those who don't know, this spell makes the entity you're looking follow your wand moves)

    Basically I need to move the entity to the player eye location but keeping a range of 15 blocks.

    I partially did it but the entity keeps flying away, this is what I did:
    Code (Text):
    fle.setVelocity(fp.getEyeLocation().getDirection());
    If there were a way to stop the directional moving, it works like a charm but the entity moves away.

    I'm pretty new on vectors, don't really know exactly how they works (i've read about it, bit still don't understand at all)

    Hope you understood me, sorry for my bad english and thanks!
     
Thread Status:
Not open for further replies.