Need Camera Movement help please!

Hi I have a very simple question, I am making a 2D game. How do I make it so that the camera view follows the ball down an when it catches up u lose?

I understand i haven’t asked the question in a professional way but im still learning. Also i have done some tutorials but haven’t found one to suite my needs.
Also i am doing the coding in C# .

Thank you!
Any help is appreciated!

An easy way to do this is to use a Collider2D, then write a script that waits for an onCollisionEnter2D ( Unity - Scripting API: MonoBehaviour.OnCollisionEnter2D(Collision2D))

  1. Create an Empty GameObject
  2. Name the the GameObject “GameOverZone”
  3. Add BoxCollider2D Component
  4. Attach your C# Script implementing OnCollisionEnter
  5. Make the GameOverZone a child of your main camera
  6. Offset the GameOverZone to match your game expectations

When the camera moves, the zone will move, so at a certain point the ball will Enter the collision zone. Good Luck!

1 Like

Cant thank you enough GAmeDevMig!!! I really appreciate it!