Changing From Camera To Camera

Is there anyway I can switch from seeing through one camera to seeing through another camera??

Thanks in advance :slight_smile:

i think there’s really only one, so you need to reposition it as desired. could build a little table or object for each setting …

@Creator27 - hope this helps


function setup()
    --
    img = image(CAMERA)
    orient = true
    parameter.action("Switch",function() Switch = not Switch end)
end


function draw()
    -- This sets a dark background color 
    background(40, 40, 50)
   if Switch == true then 
        cameraSource(CAMERA_FRONT)
    elseif Switch == false then
        cameraSource(CAMERA_BACK)
    end
    sprite(CAMERA,WIDTH//2,HEIGHT//2)
end


@Creator27 - oops, think I may have missed the point. Do you mean the Craft camera ?

If so look at the definition of Cameras in the dependency of that name

orbit viewer:init(entity,target,zoom,minZoom,maxZiom)

Which is the one I think you need.

You need to possibly reposition the entity and Chang’s the target position. Just depends what exactly you are wanting to achieve.

If you actually need a second camera I think you ma be able to define one, as the routine is a class, you may have also to build up a second scene.