Pigs can’t look up directly into the sky in the standing position.
The anatomy of their neck and spine restricts the mobility of their head to 45 degrees. However, a pig can lie down on their back to see the sky.
The movement of the pig’s head also depends on the fat present around the neck. More the fat less will be the movement of the head. In general, farm pigs have more fat around their neck than wild pigs.
The pig’s neck is evolved in such a way because the pig’s food is present low on the ground.