Skip to content

LookControl 5.46.0 ​

final class · pocketmine\entity\ai\control\LookControl · source

Turns the mob's head (head yaw and pitch) towards a point. The look target must be set again every tick (by the goal that wants it); otherwise the head turns back to face forward. The body follows the head when the head turns too far.

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\Mob $mob)

hasWanted() ​

php
public function hasWanted() : bool

setLookAt() ​

php
public function setLookAt(float $x, float $y, float $z, float $yawSpeed = 10.0, float $pitchSpeed = 40.0) : void

setLookAtEntity() ​

php
public function setLookAtEntity(\pocketmine\entity\Entity $entity, float $yawSpeed = 10.0, float $pitchSpeed = 40.0) : void

tick() ​

php
public function tick() : void

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.