The pig follows a wall, but it will switch from side to side or even corner to corner if it is in a small corridor. The pig will steal any gems it gets its hands on. You can walk over the pig if it's not moving.