I'm trying to move my camera from one point to another, I noticed the usual method is to
but this does not work for me, tried with a gamecamera2d and a gamecamera2d drag, none of them work, this is what I did exactly:
After creating the cameras with the scene menu of AC I used the action list editor and created two new actions, the two camera switch actions, I used these ones after an item pick up that I have already working, the idea is that the item is picked up and then the camera moves, but nothing happens after the item pickup
Any idea on how to fix it? I'm out of clues here
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Also I'm using naninovel together with AC in case that could be causing an error, don't think so since I'm turning it off to work with AC
Welcome to the community, @zltm.
At what point do things not work? Does the camera cut to the first one, but not the second, or does nothing happen at all?
GameCamera2D Drag is a special 2D camera type that allows the player to click-and-drag to move it - you can stick to regular GameCamera2Ds if you don't need that behaviour.
It's important to be aware, though, that AC GameCameras are only used for reference. At runtime, it's the MainCamera that actually renders the game. When you switch to a new GameCamera, the MainCamera will move itself to that GameCamera's position - either instantly, or over time.
You will need to make sure that you have AC's MainCamera in your scene, and that no other camera (e.g. from another asset) is doing any rendering as well/instead.
To help debug the problem, you can enable the "AC Status" box at the bottom of the Settings Manager. When the game runs, this'll display the active GameCamera in the top-let corner of the Game window - is this listing the correct cameras at the right time?
It's also worth noting that you're not limited to switching between two static GameCameras to move the camera. You can also just use one camera and animate it directly using Unity's Animation tools, or Timeline, and then trigger that animation playback using either the Object: Animate or Engine: Control Timeline Actions.
This is only general advice, though. If you can share screenshots showing your situation, I can try to give more specific help about the problem. Please also let me know your AC/Unity versions, as well as the contents of any messages coming from the Unity Console window.
Hello Chris, thanks for your answer, I managed to move the camera but the objects on the second GameCamera2D wont show
https://imgur.com/nXhhaaL
even if I copy-paste the object that does show, the sprite on the start_cam, the sprites on room_cam won't show, I'm managing this in this manner
https://imgur.com/hlcQkT2
Something interesting is that if I move the main camera manually outside of play mode the sprits do appear
What info does the "AC Status" window reveal?
Check the Z position of your cameras. In a 2D game, it's common for new objects to have a default Z position of zero, which means everything is in the same plane.
This'll be what you want for sprites and other scene objects, but you'll want your cameras to be further back so that they can render the scene propery. Try lowering the Z position in your camera's Transform component.
Sorry for the late response
Adjusting the Z position indeed solved the issue, thanks for your answer