It is very strange, it appears the axis don’t get rotated on the landscape… like, if you move the camera to the LEFT, what you see inside the feed goes DOWN (or UP, I don’t remember) and vice-versa. And the image from the feed appears to be distorted.
There is a work-around for that problem (someone posted it in the forum and I am using it and it works fine). The work-around is basically to invert width with height and rotates -90.
The code that I use on my bar code reader is:
local cameraShapeW = params.width local cameraShapeH = params.height local cameraShape local shapeRotation = 0 local isLandscape = display.contentWidth \> display.contentHeight if isLandscape and params.fill.type == "camera" then local t = cameraShapeW cameraShapeW = cameraShapeH cameraShapeH = t shapeRotation = -90 end cameraShape = display.newRect(params.x, params.y, cameraShapeW, cameraShapeH ) cameraShape.anchorX = 0.5 cameraShape.fill = params.fill cameraShape.rotation = shapeRotation