How can i make an entities head follow player

Discussion in 'Development' started by Mr174, Feb 8, 2019.

  1. Mr174

    Mr174 Creeper

    Messages:
    4
    GitHub:
    Mr174
    Im trying to figure out how to make a entities head follow a player could i get some clues?
     
  2. Muqsit

    Muqsit Wither Skeleton Verified

    Messages:
    1,458
    GitHub:
    muqsit
    Maybe this could work...
    PHP:
    /** @var Living $entity */
    $entity->lookAt($player->add(0$player->getEyeHeight(), 0));
     
    HimbeersaftLP and jasonwynn10 like this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.