Creating a SHOOTING ENEMY in Unity | Beginner tutorial

Опубликовано: 21 Март 2026
на канале: AnanDEV
5,275
135

This simple Unity turret tutorial teaches you how to spawn projectiles or prefabs at position and also to add some kind of force, to the spawned projectile!
The turret will spawn a projectile at a custom location and the projectile would be made to move itself, either with or without rigid bodies!

This video is targeted for a beginner to Unity. There are more advanced concepts that can be implemented on top of this, to make things a lot more optimized. The intention of this video is to create simple base scripts with enough room to improve them in the future.

Download the project files on GitHub 👇
https://github.com/AnanD3V/Simple-Sho...

Watch the Instantiation video here 👇
   • How to spawn GAMEOBJECTS in Unity  

For doubts and stuff, join my Discord Club 👇
  / discord  

Behold the timestamps:

0:00 | Intro
1:20 | Setup
1:45 | Existing Player and Turret Components
2:32 | Creating a spawn point
3:07 | Creating a projectile prefab
3:36 | Coding Gun Behaviour
6:00 | Spawn projectile at the current location
8:35 | Spawn projectile at a different location
9:53 | Moving the projectile using simple translation
11:47 | Moving the projectile with Rigidbody component
13:21 | Outro

If you have any questions, put down a comment below, and I will try to answer them to the best of my knowledge.

Thank you for watching the video and reading this description. Take care.