Help with camera! (SOLVED)

Me and some friends are working on a little game. As the only programmer, I need to figure out how to use the camera object. I’ve got a character.collection in the main collection with test.go and camera.go inside. camera.go has a camera object and a script, and test.go contains a sprite, a collision object, and a character script. Everything thing works fine except the camera (and the collision, but that’s a topic for another day). character.script is set up to send the player’s location to camera.script, which sets the camera’s position with a modified z-axis. However, when I build the project, the camera just displays a black screen. Help would be very appreciated!

1 Like

Even though you can use the built-in camera component I’d really recommend that you look into one of the camera extensions from the Asset Portal:

  • There’s RenderCam from Ross Grams that can handle both 2D and 3D games
  • And there’s Defold-Orthographic from yours truly that focuses on 2D games.

Both of the solutions above have a camera.follow() function that will make the camera follow a game object. Super easy to use! Evaluate both and then make a decision!

5 Likes

Thank you so much! I’ll go check these out!

3 Likes