Detecting Screen Bounds (Unity Tutorial | 2D Top Down Shooter) @KetraGames
Detecting Screen Bounds (Unity Tutorial | 2D Top Down Shooter)  @KetraGames
Uploaded March 2023 | Updated September 2026, 2 weeks ago
In this Unity tutorial we're going to look at how to detect whether game objects are on screen or not.

We’ll make sure that the player is blocked from leaving the screen bounds.

If the enemies wander off screen, we’ll make them wander back into view.

And when the bullets leave the screen, we’ll destroy them.

This is the ninth video in our series showing how to make a full top down 2D shooter game in Unity.

The playlist for this series can be found here
youtube.com/playlist?list=PLx7AKmQhxJFajrXez-0GJgDlKELabQQHT

The project files are available to our patrons here:
patreon.com/posts/80357698

Want to follow along? This project is a good starting point
patreon.com/posts/78946679

The final script can be found here
dotnetfiddle.net/FlPuDt

Help support our work:
► Patreon: patreon.com/ketragames

Follow us:
► Ketra Games: ketra-games.com
► Patreon: patreon.com/ketragames
► Twitter: twitter.com/ketragames
► Facebook: facebook.com/ketragames

Introduction - 0:00
Preventing the Player from Leaving the Screen - 00:40
Turning the Enemies Around If They Go off Screen - 05:36
Destroying Bullets When They Go off Screen - 08:29
Summary - 10:23

#KetraGames #LearnUnity #UnityTutorials #UnityTips
Detecting Screen Bounds (Unity Tutorial | 2D Top Down Shooter)Getting Started with Character Animation Using Mixamo (Unity Tutorial)How to Use Lerp (Unity Tutorial)Unity Essentials: Simple Step-by-Step Main Menu CreationDont Lose Your Work (Unity Tutorial)Add Random Bored Idle Animations to Your Character (Unity Tutorial)Use Scriptable Objects to Improve Your Game!Fixing Slope Bounce (Unity Tutorial)2D Top Down Player Movement Using the New Input System (Unity Tutorial | 2D Top Down Shooter)C# Naming Conventions (Unity Tutorial)Adding an Action Replay/Rewind to a Game (Unity Tutorial)All You Need to Know About Coroutines in Unity! (Unity Tutorial)
Ketra Games |

Detecting Screen Bounds (Unity Tutorial | 2D Top Down Shooter)

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER