diff --git a/src/world/Entity.php b/src/world/Entity.php index 8cf68c6a0..9f2aae54e 100644 --- a/src/world/Entity.php +++ b/src/world/Entity.php @@ -552,8 +552,8 @@ class Entity extends stdClass{ public function calculateVelocity(){ $diffTime = max(0.05, abs(microtime(true) - $this->last[5])); - $origin = new Vector3($this->last[0], $this->last[1], $this->last[2]); - $final = new Vector3($this->x, $this->y, $this->z); + $origin = new Vector3($this->last[0], $this->last[2]); + $final = new Vector3($this->x, $this->z); $speedX = ($this->last[0] - $this->x) / $diffTime; $speedY = ($this->last[1] - $this->y) / $diffTime; $speedZ = ($this->last[2] - $this->z) / $diffTime;