Entity collisions, bounding boxes for entites and blocks

This commit is contained in:
GameHerobrine 2022-10-18 21:40:03 +03:00
parent 9154c0fc3d
commit 1448fd21b9
19 changed files with 265 additions and 118 deletions

View file

@ -170,7 +170,11 @@ class Vector3{
$this->x * $v->y - $this->y * $v->x
);
}
public static function fromArray($arr){
return new Vector3($arr[0], $arr[1], $arr[2]);
}
public function __toString(){
return "Vector3(x=" . $this->x . ",y=" . $this->y . ",z=" . $this->z . ")";
}