make a global var pointingDirectionFromKey
if(key==UP)
pointingDirectionFromKey=0; // North
etc.
and then when display the images check if(image.pointingDirection == pointingDirectionFromKey)
make a global var pointingDirectionFromKey
if(key==UP)
pointingDirectionFromKey=0; // North
etc.
and then when display the images check if(image.pointingDirection == pointingDirectionFromKey)