Make a FIRST PERSON SHOOTER in 10 MINUTES - Unity Tutorial
ฝัง
- เผยแพร่เมื่อ 11 ธ.ค. 2022
- Let's make a FIRST PERSON SHOOTER in 10 Minutes!
● Sci-Fi Gun Light: bit.ly/3HuFC6y
● INSTALL UNITY: • INSTALL & SETUP UNITY ...
● Unity Rolly Vortex Game: bit.ly/3NLfNPQ
♥ Don't Click This! : bit.ly/2Zi3vu9
♥ My Second Channel: bit.ly/3jvI8g6
--------------------------------------------------------------------
✅ My current Productivity Setup 👇:
● Gaming Headset: amzn.to/3HyXgp2
● Gaming Mouse: amzn.to/3ni4Ygp
● Best Webcam: amzn.to/44pVUqw
● Keyboard: amzn.to/3ALXB3M
● GPU: amzn.to/42mylNt
● CPU: amzn.to/44lOBjs
--------------------------------------------------------------------
FOLLOW ME:
● Facebook: / developer3.5pro
● Sketchfab: sketchfab.com/GDTitans
--------------------------------------------------------------------
► All content by GDTitans is 100% free. I believe that education should be freely available to everyone.
A mobile version with a cool environment & Enemy AI's on mobile will just be soo amazing. Do make something like that man.
Everyone would like it
Thanks for your suggestions
@@GDTitans appreciated man few time ago , i have learned to make an endless runner of your series.
Learned a ton from it.
Again thanks for all of this effort.
##################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
Where do i can find the first person mode
im total noob. its my first unity tutor i can complete. thx alot.
I always get the 'Type or namespace definition, or end-of-file expected' message in the console and i cant paly the game since it says 'All compiler errors have to be fixed before you can enter playmode!' I dont know how to fix this
great tutorial im using a different pack and had to rotate the gun and bulletpoint but the gun keeps shooting backwards
2:59 the convert seleted built in materials to URP is gray and wont let me interact/press it.
i attached the bullet to the gun, It says that my gun s firing but i only see the bullet 0.1 second when i strafge to the right. I changed the bullet speed to 1 but still cant see it....... Does anyone know why ????
impressive tutorial again. Thx my friend!
Thanks,
Really glad it was helpful!
GDTitans How can i make it so the bullet destroys a gameobject with "enemy" as the tag?
nah man the "3D BALLS" got me rolling on the floor
My bullet doesn't shoot to the crosshair in the middle of the screen but next to it, what can I do?
how can I change the default keybind settingd to zqsd ?
this did not take 10 mins it took me a day lol
FAX!
Still surprised what it didn't took whole decade
He told will only teach u in 10 min . Sadly 😢 .
It’s better then nothing
Indian scammer
Hi i am trying to attach the gun in the player capsule but its not attaching and its invisible.Please help me
This tutorial doesn't work I just get error messages. Can you create an updated one that works with the new unity versions or whatever?
please I know it an old video am gonna talk about but
in the FPS android Controller Setup video
you didn't put a button for weapon switching a
pretty please can you help me with that
Please
Failed to import package with error: Cannot import package in play mode.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) ???
whats the button to select all of the guntwo
wat unity editor are you using
bro,when i try to fire it, IT ASCENDS UP TO THE HEAVENS . idk plz try to give me a solution.
4:47 how did you open the StarterAssests in visual studio? For me it opens in google and i cant owerwrite anything in it
Go to Edit > Preferences > External tools
Then, change the External Script Editor
Can you make a tutorial on adding crosshair and aim correctly. So that we shoot correctly
So you make the control to shoot on the player script, but how do you modify weapon behavior, swap models, that kinda thing? For instance how does burst fire work?
ayo i also need that information. did you figure out yet?
@@apfelhuhn let me know if either one of you find a good source of info for this kind of stuff please 😭❤️
I followed all of the script and directions exactly and ckecked over it multiple times and yet the bullet doesnt fire.
how do i add sound effects
Good work keep it up!
Thanks man
what a nice and clear tutorial. thank you
No worries
if your bullet shoots backwards or a little to the right, change your bullet speed to negative 600. i had the same problem and this should fix it.
Tysm
Wait, does it also work if it only shoots to the left?
@@LeGordoBondiola The rotation of the bulletPoint (where the bullet is created) is off. The bullet is created with the same rotation as the bulletPoint. The OP must have his bulletPoint pointing backwards so that changing the speed to negative makes the bullet move backward from the direction it was created in, which is the direction it should go in the first place.
To fix, change the setting in the top left of the Scene tab from "Global " to "Local". Then rotate the bulletPoint so the z axis (the blue arrow) is pointing forward. Unity considers the z axis as forward. If it is shooting left, try rotating the y axis of the bulletPoint's transform by 90 degrees.
@@elianderson727mine shoots to the left of my gun regardless of my rotation how do I fix?
@@porpoiseproductions1422 Here are a few things to try.
Make sure you are changing the rotation of the BulletPoint, not the gun or the bullet.
Make sure you are correctly referencing the BulletPoint in you Gun script (your BulletPoint should be dragged into the slot you created in the inspector with public GameObject bulletPoint). 10:37
In your Shoot() function, when you instantiate the bullet, try changing it's rotation (the last argument) to bulletPoint.transform.Rotation. 11:03
Mess with the freezing the bullet prefab's rotations 9:13
Hi! My bullets don't shoot. It shows in the console that the variable bulletPoint is not assigned in the Gun.Shoot() and Gun.Update(). I made everything exactly like in the video, but something is not right.
The reson is simple you have to add the bulletPoint gameObject we made to empty field of the gun's bullet point
Best tutorial in the world i learnd lit from it thx bro
Got anything on a weapon system brother?
Really helpful and clear, thanks
Glad it was helpful!
excuse me could anyone just help me I have a question if I use this project and change it will there be any problem if I upload the game I mean can I get money from it????\
i think as long as u dont make over 100k u good
i can not see the bullet , how can i fix that?
im having trouble, I cant put the sci fi gun under player camera root unless I do it in prefab
\
Unpack the prefab if you want
can i make this with 2 gb of Vram?
Is the part in Visual Studio required for it to work? My laptop won't support Mono so I can't open it.
You can use visual studio code its lightier than original one its 100 mb
Can you open this game in an Oculus Quest 2?
bro you are best in the world
i've got an issue Object referernce not set to an instance of an object . Tell me how can i fix this?
I am having same error. Need solution
which template is he using
Question, I have a bug where it shoots, but the bullets go completly to the left, have encocountered this bug during the coding phase?
im pretty sure your bulletpoint is off
Thx bro! You saved my life@B4ttingOld
For some reason my unity says that the type or namespace StarterAssestsInputs can’t be found. I’m using the correct namespace and the problem is still there. Please help
You have to put the starerassetsinputs script on your gun
Have you installed the Starter asset plugin from the package manager?
😮😮😮 Super Nice 👍👍👍👍
hey so i used this tutorial and its a really good one but idk why but the bullets go to the right instead of forward how do i fix this?
I'm guessing the transform is off on the bulletPoint (where the bullet is created). The bullet is created using the rotation of the bulletPoint. Force is then applied in the direction it is facing (using "transform.forward * bulletSpeed"). Unity considers the z axis (the blue arrow) as forward.
In the top left of the Scene view change the setting from "Global" to "Local". Select the bulletPoint and rotate it so the blue arrow is pointing forward (if it's shooting right, rotate the y rotation by -90). That should fix it.
No,
Check gunpoint rotation
whenever i try to add the script to the gun it just says it doesnt work because the class file doesnt match the script name or whatever even though it quite literally does
If you're still having this issue make sure the script name is the same as the word right next to "Public class"
@@butterdog9483 im having this issue and i even tried just to create a script without renaming it and its still the same problem.
@@danielinserte9814 same
@@Cramped_is_sus Delete the script and try to create a new c# script with the same name
its the new or well now old Unity Version sorry! the team will try to resolve this
its helpfull but i cant get my gun to shoot and my camera is in the floor
i made some mistakes can you put the code in the describtion
This is da best tutorial ever
Thanks 😊
the code in this video didnt work but heres code that does the same thing
using UnityEngine;
public class NewBehaviourScript : MonoBehaviour
{
private bool _shoot;
// Start is called before the first frame update
void Start()
{
_shoot = false;
}
// Update is called once per frame
void Update()
{
if (Input.GetMouseButtonDown(0))
{
_shoot = true;
}
if (_shoot)
{
Shoot();
_shoot = false;
}
}
void Shoot()
{
Debug.Log("Shoot");
}
}
@@jamieandroidgaming5714 thx
this is a great tutorial but i spent hours trying to fix bugs in the code where i mistyped and i was like "every single line of code is correct which one is it?" and both times it was a missing ; at the end...
You do realise that’s your fault right?
Please help mine is shooting to the left
SAME... if u find a solution PLS TELL ME!
@@timeaverage9422 I tried a couple different things the only thing that worked for me was in the gun script towards the bottom were it says transform.forward change forward to right or left or backward depending on which direction your bullet is going, i couldn't tell you why it's doing it, but that's what worked for me. Hope this helps
@@shrimplyawesome378TYSM! It fixed it! 😊
Help. I don't have the first person template. where do I get it from? Ps. I am using unity 3.6.1 and editor version 2022.3.15f1 LTS
did u figure it out?
( i have the same prob )
@@arsfnp4644 you can use editor 2021.3.33f1(MAKE SURE ANDROID BUILD SUPPORT IS TURNED ON)
Start new series about multiplayer and friendlist
you will need a server for that which can be complicated to setup.
Yes!
Kk
whenever i try to put the Gun C# scripts it says It cant add the component because the script class cannot be found. How do i fix this?
@Knight i dont understand lol
Make sure that the 'public class' is declared as 'public class Gun : MonoBehaviour', it's on top of the Gun C# script file
@@gabrielbatista1536 yeah i figured it out, but now it wont let me playtest
Can you please help me the Gun.Cs is not working i am getting meny errors. If possible can you copy and paste the code so i can use yours?
same problem
if you find a solution then please tell me.
I'm looking this video whilst I sleep wish me luck
It's not allowing me to attach the gun file to the gun I need help
Same
help! My unity is 3.5.0 and I can't find first person template...
same
how do i get the first person option in creating a new project
I can’t find it either
I am making a overwatch 2 ultimax witch is a unofficial basically mugën but for fps but just overwatch
hi i love your tutorial and i was wondering how can i add the shooting sound everytime i shoot?
Hello, you would just add logic after the bullet gets shot to play the sound.
probably doesnt know how@@Ultrapassive
i keep getting a texture error
Does this program require a high end gpu if making basic 1080p games?
yes
no you could easily use an RX580
how to read input to do automatic fire? In other words, how to create get input if (Key is held down during next frame update?)
Thank you for the nice tutorial
I believe you can just copy the code from the sprint logic. Sprinting works by holding sprint button down.
@@Ultrapassive I'm going to try that. I didn't even think of that
@@manuelhernandez2017 how'd it go?
how do you select all the materials at once?
Shift + mouse left button
Please solve this,
My camera rotation is moving in only horizontal way
But not vertically
Start a new first person project in Unity with the fps sample pack then follow this tutorial
How are you getting everything recommended in script in visual basic, I had to type everything myself? is there a setting I need to check?
same idk maybe his software just adapts or sum crap. idk. LOL
in unity go edit > preferences > external tools > choose visual studio for external script editor and press "regenerate project files" button below. After this close your visual studio and open it again and it should work
Hi brother how are you I'm new subscriber I'm From India (Tamilnadu) Your video's good I'm like 🙋🤝 👍
Glad it was helpful 👍😀
Hey, I go to unity hub I can’t find the first person
You have to download it
bro wtf it wont let me attach the script to gun model
i keep getting a cs1002 error on 21,24 but theres no problem with the code
@@Inperi you were right
@@TingunStudios you may erase that line
Please HELP I'm going crazy.... I'm trying to download the right version but I can't see the first person Template of the version you showing... I tried everything but it won't appear
You need to install a diffrent unity editor mine automatically downloade the 2022 version but you need to download the 2021.3.35f1 version
Thanks
When I press left mouse button it does not show in the console and I cannot shoot either
Hey, im new to this stuff and i cant help but theres a Unity discord you can join with ppl that can help rlly easily
It’s fine now I found another tutorial but thanks for the suggestion
@@CKdunno hi I need a help ۔ ۔
@@Surgicalmushroom bro what tut? im still struggling lol
cool video)
Thanks 😊
hi i get the error Assets/Scripts/Gun.cs(8,38):CS1002;expected. please help
me too i think im writing the code wrong
@@awesomecoolguyepicsocoolamI123 brooo same
@@awesomecoolguyepicsocoolamI123 my code is same but idk whats wrong
Debug.Log?
bro, then what's the point of making game when u have assets. if u made a tutorial with out assets or fps controller then i think it's good.
I dont have the First Person template, what do i do?
Just in case you didn't work it out, or anyone else sees this issue (like I did). I found a package in the Asset store called "Starter Assets - First Person Character Controller | URP". So I created a new project of type "3D Core URP" and downloaded and imported this package. Then I removed the default scene from the hierarchy, and dragged in the scene called "Assets/StarterAssets/FirstPersonController/Scenes/Playground".
my bullets go backwards instead of forwards, what should I do?
Make bullet speed -600
@@FifaMobileShorts260 or just rotate the gun point at angle 180°
Can u please do a video on how to make realistic shooter game
my bullets only fall immediately after spawn, they don't fly far, what should I do?
Increase the force 💪 that is applied to the rigidbody
@@GDTitans How can i increase the force?
good!
Thanks!
bro can you please make a video for fps microgame unity. it is working on pc but not on android controls. please make video that how to add android controls to microgame unity
Okay, I will try
pls can i get code?
when i shot the bullet, the bullet fires into the right, how to fix it?
same buddy, same...
@@timeaverage9422 change the bullet speed to negative, i had the same problem
@@CJ_Gamezz_YT pls show your game on yt when it's ✔️
Don't know why but my camera is moving only horizontally
:(
I want to gather people with these skills to develop a first shooter game, not just a game, but a special one. So that I will tell them what to make, how each character moves and attack, what environment and so on.
Would you please direct me where to start or how to get in contact with another person that knows better that should tell me what to do from start to end please?
Do you have the money to pay these people? You know how long creating something like this takes, right? Lol...
I'm very curious what your idea is
Can this be installed on phone?
Yeah
The shooting is not working it is not showing up in the consol Please Help!
Did you ever get a fix??
@@TheOKGamerAF nope
Hi
Can we change it into VR game ?
just build it in the vr game thing then
Can make video how to make own building in fps game
What About rolly vortex game. Is it finished?
No I'm planning to add a video about admob ads with the shop system
@@GDTitans that would be so helpful sir
9:49 I dont see the bullet prefab on gun script I have perfectly copied the whole code from the vid what do I doooo aghhhhh :C
nevermind im a genius and fixed it :DDDDDDD
Great 👍
Great tutorial bro👍
Thanks man 👍😀
@@GDTitans how do you make it online?
THANK YOU SOOO MUCH BRO!!
Any time!
how do I add a firerate to this so I can hold it down and shoot?
im trying to figure out the same stuff man
share the link
can you paste the whole script in the description becuase i cant code at all.
then dont make games
it takes skill to make games...
How do you make the bullet move in a straight part and destroys on contact with an object
You would use a fast enough velocity or turn off gravity for the bullets. Then use a collider to detect the collision and delete the bullet after the collision.
My bullet just ascends into the backrooms. Is there a way to fix that?
go to the bullet prefab and go to it's rigidbody and change the collision detection from discrete to continous
@@BO0O0O0O0O0O0O0O0M That was like 3 months ago. I quit game developing like a week ago. But thanks for the reply.