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))
- Create an Empty GameObject
- Name the the GameObject “GameOverZone”
- Add BoxCollider2D Component
- Attach your C# Script implementing OnCollisionEnter
- Make the GameOverZone a child of your main camera
- 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!