I have add particle to a player but when i turn to the right side the particle are there look at picture but i will that the particle always are on the back side
Here PHP: $x = $player->getX(); $y = $player->getY(); $z = $player->getZ(); $level = $player->getLevel(); $v4 = new Vector3($x - 0.5,$y + 1,$z);//Vorne $v5 = new Vector3($x - 0.5,$y + 1.1,$z + 0.2); $v6 = new Vector3($x - 0.5,$y + 1.2,$z + 0.3); $v7 = new Vector3($x - 0.5,$y + 1.3,$z + 0.4); $v8 = new Vector3($x - 0.5,$y + 1.4,$z + 0.5); $v9 = new Vector3($x - 0.5,$y + 1.5,$z + 0.5); $v10 = new Vector3($x - 0.5,$y + 1.6,$z + 0.5); $v11 = new Vector3($x - 0.5,$y + 1.7,$z + 0.5); $v12 = new Vector3($x - 0.5,$y + 1.8,$z + 0.5); $v13 = new Vector3($x,$y + 2,$z + 0.5); $v14 = new Vector3($x,$y + 2,$z - 0.5); $level->addParticle(new FlameParticle($v4)); $level->addParticle(new FlameParticle($v5)); $level->addParticle(new FlameParticle ($v6)); $level->addParticle(new FlameParticle($v7)); $level->addParticle(new FlameParticle($v8)); $level->addParticle(new FlameParticle($v9)); $level->addParticle(new FlameParticle($v10)); $level->addParticle(new FlameParticle($v11));
Make sure that you add if statements that check the direction that the player is facing PHP: if($player->getYAW() == (int) $direction) { $v = new Vector($x, $y, $z);}$level->addParticle($v);