Forum rules - please read before posting.

Drag Camera 2D positioning issue

I am using the Drag Camera 2D, but have a problem with a scene that has its background larger than the actual screen size. The default camera position is in the center of the scene, but my character starts on the side of it and I need to start the scene with the camera focused on him and not on the center.

Is there a way to set the starting position of the Drag Camera? I tried to change the transform coordinates, but that caused an issue with the drag - the camera then moves outside of the background image of the scene into the "void". The background constraints are ignored.

Comments

  • edited January 23

    Try using the "Offset" fields in the GameCamera 2D Drag component's Inspector, rather than the Transform values. These should reposition the camera, but also respect the constraint settings.

  • Unfortunately changing the Offset value has the same effect: the panning moves the camera outside of the scene.

  • Apologies - I've recreated this issue on my end as well.

    I'll look into this further and will update.

  • Thank you, please let me know. I hope there is a solution to this.

  • I have sent you a PM.

  • I found another problem. The 2D Drag Camera cannot be dragged all the way on the Y axis in either way, it works properly only on the X axis. There seems to be some limit on how far it can be dragged on the Y, but I just cannot find what could be causing it? The drag camera movement is set to be limited by the scene's background image, but i am just unable to drag the camera to the upper and bottom parts of the scene. I tried both with the original script and the one you sent me, but the problem is the same.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.