[SOLVED] Position of Render Camera not correct

#1

Hi Defold community,

I am using rendercam library in my project and follow every step according to the documentation. However, the camera always position at the top right-hand corner of my screen, can anybody help? Thanks.

52%20AM 58%20AM

0 Likes

#2

Hello kios1
Have you placed camera game object in the right position in your game collection? And maybe try to you use option Use view area. Example : http://prntscr.com/qijws3

1 Like

#3

Did you set the render script in your game.project? Does the camera have a parent object that has an offset? Are there any errors in the console?

1 Like

#4
  1. I do set the correct render script in the project
  2. The parent object doesn’t have any offset. The camera object is a sub object of the character sprite.
  3. There are no error in the console
0 Likes

#5

For you guys reference, it does work on a larger screen device which is my iMac. But it didn’t work correctly on my Macbook.

0 Likes

#6

Hmm, and what do you have the window resolution set to in your game.project? Perhaps it’s larger than your Macbook screen? What happens if you resize the window, does it correct itself?

2 Likes

#7
  1. The resolution in my game.project is 1280 * 720. For your reference, my Macbook is Macbook Pro 13 inch.
  2. No, it doesn’t correct itself even if I resize the window.

  1. It does work when I check the fullscreen option
0 Likes

#8

Haha, it works, when I select High DPI.
The issue is solved. But may I know why ?:laughing:

0 Likes

#9

Ah, cool. Maybe I can add a note about that to the readme.

To be honest I don’t really know how High DPI stuff works, but I guess if there is a difference between the actual pixels and lower res “logical” coordinates it makes sense that RenderCam could be working with the wrong ones (double-size I guess).

2 Likes