@@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.
@@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.
@@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
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
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????\
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?
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 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 ????
@@timeaverage 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
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
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.
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?
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".
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
Press on the error twice, it'll open up visual studio code and bring you to the line that is causing the error. After that, make sure there is a ; symbol to conclude that line of code. Hope this helps
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"); } }
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
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...
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
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.
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
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
This is a great, simple, focused tutorial - describing how to download, import, and use a gun asset/prefab, how to get the gun barrel to follow the player "look", and how to shoot a "bullet" (which shows how to instantiate a prefab in code). Only issue I have is that the gun barrel disappears into walls - anyone else see this issue?
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.
##################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
im total noob. its my first unity tutor i can complete. thx alot.
Where do i can find the first person mode
Idk
In the 2021 Editor version
GDTitans How can i make it so the bullet destroys a gameobject with "enemy" as the tag?
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)
great tutorial im using a different pack and had to rotate the gun and bulletpoint but the gun keeps shooting backwards
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
nah man the "3D BALLS" got me rolling on the floor
impressive tutorial again. Thx my friend!
Thanks,
Really glad it was helpful!
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?
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
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
Start new series about multiplayer and friendlist
you will need a server for that which can be complicated to setup.
Yes!
Kk
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
birinchi yuz camerani qanday qilish mumkin player ko'zi bilan ko'rish uchun
what a nice and clear tutorial. thank you
No worries
Really helpful and clear, thanks
Glad it was helpful!
bro you are best in the world
Got anything on a weapon system brother?
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
@@nayrb727 Yes, but you have to get the Unity Premium version so you have rights
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 😭❤️
This is da best tutorial ever
Thanks 😊
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?
It's not allowing me to attach the gun file to the gun I need help
Same
@@sahilmishra2012 Go to the Gun object. In the inspector window, drag the script (or "file") right on the Add Component button. Done!
My bullet doesn't shoot to the crosshair in the middle of the screen but next to it, what can I do?
2:59 the convert seleted built in materials to URP is gray and wont let me interact/press it.
Hi i am trying to attach the gun in the player capsule but its not attaching and its invisible.Please help me
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 ????
Please help mine is shooting to the left
SAME... if u find a solution PLS TELL ME!
@@timeaverage 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! 😊
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
Can u please do a video on how to make realistic shooter game
help! My unity is 3.5.0 and I can't find first person template...
same
I'm looking this video whilst I sleep wish me luck
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
Best tutorial in the world i learnd lit from it thx bro
how do i get the first person option in creating a new project
I can’t find it either
how can I change the default keybind settingd to zqsd ?
Good work keep it up!
Thanks man
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.
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?
Wow, nice tutorial! How do I publish it?
Go ahead!
th-cam.com/video/5ANuDZjhbFY/w-d-xo.html
@@GDTitans thanks
bro,when i try to fire it, IT ASCENDS UP TO THE HEAVENS . idk plz try to give me a solution.
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
I followed all of the script and directions exactly and ckecked over it multiple times and yet the bullet doesnt fire.
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".
Can this be installed on phone?
Yeah
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?
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
Does this program require a high end gpu if making basic 1080p games?
yes
no you could easily use an RX580
Failed to import package with error: Cannot import package in play mode.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) ???
wat unity editor are you using
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 👍😀
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
THANK YOU SOOO MUCH BRO!!
Any time!
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
for the Gun script i got 1 error that said "error CS1002: ; expected" pls help
Press on the error twice, it'll open up visual studio code and bring you to the line that is causing the error. After that, make sure there is a ; symbol to conclude that line of code. Hope this helps
@@ftwTactical still don’t work😢
@@RZR_2rea Did you get a different error?
@@ftwTactical prob
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");
}
}
@@jamieandroidgaming thx
wheres the code?
how do you select all the materials at once?
Shift + mouse left button
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?
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
how do i add sound effects
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
which template is he using
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?
The shooting is not working it is not showing up in the consol Please Help!
Did you ever get a fix??
@@OKGamerAF nope
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.
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°
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
can i make this with 2 gb of Vram?
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
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
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
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?
Hi
Can we change it into VR game ?
just build it in the vr game thing then
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
i made some mistakes can you put the code in the describtion
but show the demo with recoil...your Tutorial gun don't have any recoil...
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
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
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 am making a overwatch 2 ultimax witch is a unofficial basically mugën but for fps but just overwatch
whats the button to select all of the guntwo
Hey, I go to unity hub I can’t find the first person
You have to download it
guys if you have any errors just copy the whole code and paste it in chatgpt and done
chatgpt will fix the code
I don't think so, I have tried chat GPT and it makes some mistakes.
@@GDTitans I think ChatGPT is amazing but cannot process code that's too large
Great tutorial bro👍
Thanks man 👍😀
@@GDTitans how do you make it online?
😮😮😮 Super Nice 👍👍👍👍
good!
Thanks!
Bro,Your Video Is Like @Brackeys
And I Really Like This Fact...Can U Plz Make A Video On Multiplayer And Server UI And Menu UI
Can make video how to make own building in fps game
It isnt shooting I have checked everything and it’s all the same but it ain’t shooting pls help
Update I think it has something to do with the input system
if u are using visual studio then make sure u save the code thats what i messed up on..
@@timeaverage I have already fixed it just started over and it worked after that
@@pffguy133 ok nice
7:18 naw bro didnt notice it said "GetChild"
cool video)
Thanks 😊
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
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 👍
This is a great, simple, focused tutorial - describing how to download, import, and use a gun asset/prefab, how to get the gun barrel to follow the player "look", and how to shoot a "bullet" (which shows how to instantiate a prefab in code).
Only issue I have is that the gun barrel disappears into walls - anyone else see this issue?
its a common issue, there is a fix tho. Search it up on youtube. Its by making a seperate layer for your gun
this is common for most if not all games, the gun you see in your hand in games is usually just a picture of your gun, not your actual gun
Where is the first person core?
th-cam.com/video/ZYCh5NoZt8o/w-d-xo.html
Bro lets make a game together i will make the assets and you will will make the game you can keep 60% of the profit
Don't know why but my camera is moving only horizontally
:(