Change squids looking direction

Discussion in 'Plugin Development' started by MisterErwin, Apr 6, 2013.

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

    MisterErwin

    Hello together,

    how can I change the looking direction of a squid (if a location is given where the squid look at)?

    That code won't work:
    Code:
    Vector dir = to.toVector().subtract(this.entity.getLocation().toVector()).normalize();
    s.setVelocity(dir);
    Thanks,
    MisterErwin
     
  2. Never tried it. Try squid.getLocation().setYaw() and .setPitch()... Or maybe you need to teleport it to that location then, if you know what I mean
     
  3. Offline

    MisterErwin

    Hm.... but how can I get those yaw and pitch values (from loc a to loc b) ?
     
  4. Offline

    JazzaG

    With trigonometry ;)
     
  5. Offline

    MisterErwin

Thread Status:
Not open for further replies.

Share This Page