Hi, I have been trying to scale down my camera but every time I can’t move. Is there any thing to do?
You cannot scale the camera.
Not sure if you attach the camera to an object and scale down the object ir could works…
Hi @Austin why do you need to scale the camera?
@Austin Hey Austin, As DaniYubero said, unfortunatly you can’t scale the camera; However you could scale the entire world around the camera giving the illusion of growing/shrinking. I’ve done this by adding all items to a “worldGroup” then I’m keeping track of the player’s position in this world by adding a dummyObject to the group to represent the player. While scaling the world I’m setting the camera’s position to that of the dummy’s continuously; This to prevent that the world’s changing scale ends up moving the player’s position in it.
The only problem is that when you shrink down very far the world’s boundries end up blocking part of the map, technically you could make the whole map accessable by moving the entire map as the player moves, though this is quite challenging to achieve. Hope to have helped you anyhow, and good luck on the game!
Cheers, Mate
thank you for the help, my class have always been asking how to ‘make the camera smaller’.
it helps a lot
Hey what’s the code for shrinking and growing
Luc gives a good example in CoBlocks.
By using the TypeScript (or Python) api is getting even easier. You can scale elements of a list however you like (elements being BaseItems, groups…) in a few lines of code:
var alist = [dummy, sofa, bycicle, schelf, mice]
growpanel.input.onClick(() =>{
alist.forEach(element => {
element.transform.multScale(1.2)
});
})
schrinkpanel.input.onClick(() =>{
alist.forEach(element => {
element.transform.multScale(0.8)
});
})
Remix of Luc’s Shrink/Grow Player CYR-NCZ