Pretty simple problem, I have a player and I am trying to make the camera follow it. I have done this before by making the camera a child of the player, but this time it isn’t working. I think the scene is already using some other camera, because it’s just ignoring my player camera entirely. I can’t find any documentation about this on the forum.
so you have 2 camera on a scene tree?
If you have more than one camera, there is a setting in the camera node named “Current”.
You can activate that to make that camera the active one.
If no camera have the ‘Current’ activated, it’ll automatically get the first one and make it the current one.
I have 1 camera in the scene. I tried placing another camera to see if the “current” setting would show up but it didn’t.
Can you post a screenshot of your scene tree?
I’m going to have the camera as a child of MovementCharacter, but it’s currently in Editor for testing. None of the other nodes have a camera in them. Also please don’t ask what I’m making, I can’t explain it.
Okay, I’m not 100% sure, but I think the issue is with the face that your character exists inside of a canvas layer. Can you try checking the “Temp” node and seeing if “follow viewport” is checked and see what that does? Even if that doesn’t fix it, I’m confident that the canvas layer is the issue.
I looked at it, and it was not enabled. When I enabled it, I wasn’t able to move my character for some reason.
The reason I have “Temp” there is because without it the character is behind all the other UIs.
So I had to add a RemoteTransform2D to my Player in the Main scene implementation and attach the Camera2D to that in order for it to track my player. Hope this helps.
Thanks for the suggestion, but that didn’t work.
Can you show your camera settings?
It’s all default settings.
did you check your runtime’s scene tree (remote tab), if it’s supposed to follow player, the camera should be the child of the player
I did, I know that’s not the problem.