Camera follow only in one direction?

Is it possible to use a camera follow in only the x-direction for example?

Like when a character is moving on the x-axis the camera is following him, but when he is jumping the cam is not moving?

There are different camera systems you can use, but in a general answer yes. If you have the source to the camera, just comment the code that does the Y movement.

I did a Christmas themed dodge the objects game and I just used an enterFrame or transition to move the object group by changing the .x value of the group.

Rob

Cant you use map.setCameraBounds for this?

map.setCameraBounds({xMin = xMin, xMax = xMax, yMin = yMin, yMax = yMax})

Thx for the help!

After some trial and error I went with the following solution for the problem:

I used map.positionCamera(x,y) in my gameloop listener which is called every frame. So I can position the cam on the player x position and the cam y value on another point on the screen.

There are different camera systems you can use, but in a general answer yes. If you have the source to the camera, just comment the code that does the Y movement.

I did a Christmas themed dodge the objects game and I just used an enterFrame or transition to move the object group by changing the .x value of the group.

Rob

Cant you use map.setCameraBounds for this?

map.setCameraBounds({xMin = xMin, xMax = xMax, yMin = yMin, yMax = yMax})

Thx for the help!

After some trial and error I went with the following solution for the problem:

I used map.positionCamera(x,y) in my gameloop listener which is called every frame. So I can position the cam on the player x position and the cam y value on another point on the screen.