Camera Viewport Offset Issue?

Hi I am using camera offset for scaling the game.
Like this, offset.y, gameSize.x, gameSize.y);

The offset works great, the game scaled and positioned great just like I wanted.

But when offsetting the camera, the game inputs / bound / hitboxes are all off and at the wrong positions.

Is there something I am missing?
Or is this a bug?
The inputs does not offset with the viewport?

How do I fix it so that offsetting the camera viewport will also offset the game bound/inputs as well?


It seems to work in multi cam sprite. :woman_shrugging:

Thanks. The camera offset wasn’t the issue, it seems that the pointer has a bug when offsetting camera?
I was using custom pointer, by hiding the the cursor, use an image and move it using

this.input.on(‘pointermove’, this.onPointerMove);

onPointerMove(pointer) {
this.cursor.x = pointer.x;
this.cursor.y = pointer.y;

It seems that pointer.x and pointer.y is wrong. But, I fix it by offsetting it to the offset value I set to the camera

e.g., offset.y, gameSize.x, gameSize.y);

onPointerMove(pointer) {
this.cursor.x = pointer.x - offset.x;
this.cursor.y = pointer.y - offset.y;

That fixes it. The cursor now at the proper position as the mouse after adding the offset.

It this a bug? Or intended?
Currently I have to add offset value to my pointer when offsetting the camera, if I wanna move images based on pointer position etc. Would be nice if the pointer x and y is actually the proper value as you see on screen without needing to manually offset them