### Why doesn't Camera X/Y correspond to Screen X/Y?

#### infinitum3d

• Posts: 89
When my scene is created I set Camera X/Y to 0,0 but I still have to subtract the camera coordinates from my actor coordinates in order to create the actor in the right location.

I'm sorry but I guess I still don't understand the whole "camera" thing. Why is camera different than screen?

I understand why some people need a camera (I.e. For panning around the screen) but why doesn't a stationary camera match up with the screen?

#### sdieters

• Posts: 2068
here is a bit info about how the camre works:
the range of your camera is the same size as you set yout game size to. your game size is the actual size of your screen. if your scene is the same size as your game (both in pixels), you dont need to do anything with your camera, since the camera will not move if it will result in showing an area outside the game.

Quote
...create the actor in the right location.
creating an actor has nothing to do with your camera co-ordinates, UNLESS you want to create an actor in the middle of your SCREEN (so not the scene), then you will need the camera co-ordinates.
My new profile is TheIndieStation.
When you see a recent post with this name, i'm probably using my phone. So dont mind any typo's =p

#### Alexin

• Posts: 3127
The camera *is* the screen.

Quote from: infinitum3d
I understand why some people need a camera (I.e. For panning around the screen) but why doesn't a stationary camera match up with the screen?
A stationary camera can still be translated relatively to the world/scene.

Everything is relative to the scene and it doesn't move, the screen/camera and actors do instead. The scene's origin is always (0, 0) and is "located" at the top-left corner,  with the y-axis pointing down.
Knowing that the math is easy.
"Find the fun"
alexin@stencyl.com

#### infinitum3d

• Posts: 89
here is a bit info about how the camre works:
the range of your camera is the same size as you set yout game size to. your game size is the actual size of your screen. if your scene is the same size as your game (both in pixels), you dont need to do anything with your camera, since the camera will not move if it will result in showing an area outside the game.

Quote
...create the actor in the right location.
creating an actor has nothing to do with your camera co-ordinates, UNLESS you want to create an actor in the middle of your SCREEN (so not the scene), then you will need the camera co-ordinates.

ok. So it sounds like I have apparently sized something incorrectly? What I've find is that my 0,0 coordinate is approximately 64 pixels to the right of my left side. I actually have to use a -X to hit the left wall.

My Scene and my Screen must be different sizes?

Thanks! I appreciate all the help!