DeLe
DeLe

Reputation: 2480

Phaser - Change width and height Camera

In normal i have canvas size 500x500 and it will create camera size (500,500) But when i change

game.camera.width=5;
game.camera.height=5;

then visible area it the same? what will happen when change width and height camera, how to understand that thanks

Upvotes: 1

Views: 734

Answers (1)

James Skemp
James Skemp

Reputation: 8571

Based upon the documentation and an older post from the creator of Phaser on the HTML5 Game Dev Forum where he said:

You're not doing anything wrong, you just can't change the camera dimensions - they match the game size at the moment.

and then in 2015 on the same thread:

So you can tell if something is within the camera bounds or not. Which is impossible if the camera doesn't have a size.

suggesting that things haven't changed since 2013, and the camera doesn't resize as you're expecting.

Testing as well suggests that things haven't changed either.

Upvotes: 1

Related Questions