1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

How can i make an entities head follow player

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

  1. Mr174

    Mr174 Baby Zombie

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

    Muqsit Chicken

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