Techniques For Creating A Third-Person Shooter Game?

This tutorial aims to teach you how to create a full Third Person Shooter game in Unreal Engine 5. The tutorial includes a free starter kit that can be acquired from a game engine marketplace. A series of videos are provided to guide you through the steps to create a third-person game in UE5. Developing a 3rd Person Controller is challenging and time-consuming, so a template has been developed to set up a character controller for Android in less than 10 seconds.

The course contains 15 engaging video lessons that cover topics such as adding music, dynamic sound effects, and dialogue to your game. It also discusses how to build a third-person shooter game using Unity and a package called Invector. Invector was created when two developers wanted to create a third-person shooter game that was multiplayer compatible.

Third-person shooters (TPS) are a subgenre of 3D shooter games that primarily involve shooting. They are closely related to first-person shooter games. To start development, it is recommended to start with small games and use a game engine that can handle first-person shooter games. Popular choices include Unreal Engine and Unity.

GameDev.net is a resource for game development, offering forums, tutorials, blogs, projects, portfolios, news, and more. By following these steps, you can create a successful third-person shooter game in Unity.


📹 Awesome Third Person Shooter Controller! (Unity Tutorial)

00:00 Third Person Shooter Unity Tutorial 01:24 Unity Starter Assets 02:18 Player Aim Virtual Camera 04:15 Aim Input 07:28 Aim …


📹 How To Make A Third Person Shooter – Unreal Engine 5 Tutorial

In this Unreal Engine 5 blueprints tutorial for beginners, MizzoFrizzo will show you how to create a third-person shooter. We’ll set …


Techniques For Creating A Third-Person Shooter Game
(Image Source: Pixabay.com)

Rae Fairbanks Mosher

I’m a mother, teacher, and writer who has found immense joy in the journey of motherhood. Through my blog, I share my experiences, lessons, and reflections on balancing life as a parent and a professional. My passion for teaching extends beyond the classroom as I write about the challenges and blessings of raising children. Join me as I explore the beautiful chaos of motherhood and share insights that inspire and uplift.

About me

92 comments

Your email address will not be published. Required fields are marked *

  • its finally happening! Im really hoping for a melee combat tutorial that expands upon the 3rd person starter assets. would it be possible to have the melee combat have animations where you dont just animate the upper body to perform melee attacks? like if you do a melee attack, you wont be able to move until the melee animation has finished playing like in most action games? a combo and targeting system would also be nice 🙂

  • If anyone is having difficulty aiming and walking at the same time, you need to create an Avatar Mask. Open up “Humanoid” in the Avatar Mask and deselect the legs and lower IK so that only the upperbody is green. Then, click the cog wheel on the Aiming layer and add the Avatar Mask to the Mask field. This will make it so that when aiming, only the upper body bones are affected and you will still be able to walk as per the Base Layer animations.

  • I’ll be real with you, websites such as Code Monkey and Brackeys are the reason I chose Unity over Unreal when it came to answering “which engine?” The quality and accessibility of tutorials such as these cannot be overstated. Thank you for all the terrific content, and keep doing what you do! You’ve earned another subscriber/supporter!

  • for those stuck between 20:00-23:00: 1. make sure the BulletProjectile script is on the pfBulletProjectile prefab (click the prefab and drag the script on). 2. Also, click on the prefab and make sure Use Gravity is ticked off. Still following the tutorial, but was stuck for a good while on this. Good luck! update: works perfectly thank you so much this is an amazing tutorial

  • SOOOO first go-round I broke everything at 7:00 into the article. My error was that Code Monkey quickly attaches the script for toggling between the zoom and normal camera that I missed that he had attached the PlayerAimContorller script to the PlayerAmature rather than the PlayerAimCamera. I have about a weeks worth or Unity so for anyone else that hits this error hope this helps.

  • Another great tutorial, thanks a lot! Also I think I found a neat solution for aiming in the sky (14:02), without needing boundary colliders everywhere. If the raycast returns false move to an else block and create the aiming point by projecting a vector in the direction of the camera orientation, from the camera position, at a desired distance from it. For example I set mine to 200: if (Physics.Raycast(ray, out RaycastHit raycastHit, 200f, AimColliderLayerMask)) { DebugTransform.position = raycastHit.point; } else { DebugTransform.position = _cam.transform.position + _cam.transform.forward * 200f; } Let me know if I am overseeing something and there is a problem with this, but thanks again for the article.

  • For bullet not working, : – Add the bullet script to your bullet => he not showed it but it said it (i realised that after 10x perusal haha) – Make your bullet a prefab, drag and drop it in the prefab folder. Than delete it from the scene, and drag and drop the prefab in “Bullet Projectil” from thirdPersonShooterController on the playerArmature – If it bounce/not destroy; make the colider a few bigger than the cube

  • You should do a tutorial on a First Person Controller setup with full body awareness and animation rigging. I just realized while putting mine together that there are no real good tutorials for that out there for reference so I had to do mine all by scratch. It was actually more tricky than I expected. I never realized things like keeping the head and body separate for networking reasons. Or how difficult it really is to get the body to perform like an actual body in relation to eye sight and the hands/gun movement.

  • For the hit scan on 27:08 if the particle shows up on the feet it is because it is using the player transform position. Make a var called like hitpoint, similiar to the debugTransform, in the ‘raycast IF statement’ set the new var hitpoint to the ‘raycastHit.point’, and in the shoot instantiate code replace transform.position to the hitpoint variable. Thanks for the tutorial, learned alot!

  • The instantiating bullet can be used in a realistic game as then we can set the spawn point in the guns barrel and then if this happens( 27:54 ) then it shows that the bullet actually spawns from the guns itself and not from the middle of the screen, many realistic FPS/TPS games do this thing and it adds that extra bit of realism to the game really cool, raycast can be used for a more arcade shooter

  • Also for the crosshair if anyone wants an easy way to enable it when aiming and disable when not you can add (SerializeField) private GameObject crosshair; // makes a serialized field for the image of the crosshair to be assigned to. In Awake: crosshair.SetActive(false); // hides the crosshair to make sure it is hidden at the start. In Update if (starterAssetsInputs.aim) // if the user is aiming { crosshair.SetActive(true); // set crosshair to enabled. } else // if they are not aiming { crosshair.SetActive(false); // disable the crosshair } Then in Unity drag the crosshair image onto the serialized field. Hope this helps anyone who wants this easily. The full code up to the crosshair section for me is: using System.Collections; using System.Collections.Generic; using UnityEngine; using Cinemachine; using StarterAssets; public class ThirdPersonShooterController : MonoBehaviour { (SerializeField) private CinemachineVirtualCamera aimVirtualCamera; (SerializeField) private float normalSensitivity; (SerializeField) private float aimSensitivity; (SerializeField) private GameObject crosshair; private StarterAssetsInputs starterAssetsInputs; private ThirdPersonController thirdPersonController; private void Awake() { starterAssetsInputs = GetComponent(); thirdPersonController = GetComponent(); crosshair.SetActive(false); } private void Update() { if (starterAssetsInputs.aim) { aimVirtualCamera.gameObject.SetActive(true); thirdPersonController.SetSensitivity(aimSensitivity); crosshair.SetActive(true); } else { aimVirtualCamera.gameObject.SetActive(false); thirdPersonController.SetSensitivity(normalSensitivity); crosshair.SetActive(false); } } }

  • I saw an error: @ around 27:20, near the ending of the Raycast shooting tutorial, the Instantiate methods are spawning the particles at transform.position, aka the player position. This makes the particles spawn inside the player. It should be changed to mouseWorldPosition or debugTransform.position which is the raycast.point value of where the raycast hit.

  • When you turn the character to the direction you’re aiming, you use Lerp with the current position in the first argument. Lerp really works when you continually provide the original starting value and a final value on every frame. If you don’t want to keep track of the original starting value, use MoveToward or RotateToward instead. The progression of values you get with Lerp are only linear if you use it as designed, with the original starting value on every call.

  • I’ve been searching online for a true first person shooter controller Tutorial and found nun if you could make one that would be amazing for those of you who don’t know what a true FPS is it’s like a third person controller it uses third person animations and a full body but the camera is mounted on the head games like escape from tarkov and arma 3 use it

  • If you want the crosshair to only appear when you right click (like in a non-shooter focused game with shooting mechanics) then make a new script with this: using UnityEngine; using System.Collections; public class Cross : MonoBehaviour { // Graphic used for crosshair public Texture2D crosshairTex; // Rect for crosshair size and position private Rect crosshairRect; // bool to turn crosshair on and off public bool IsCrosshairVisible = true; void Awake() { Cursor.visible = false; crosshairRect = new Rect((Screen.width – crosshairTex.width) / 2, (Screen.height – crosshairTex.height) / 2, crosshairTex.width, crosshairTex.height); } void Update() { if (Input.GetMouseButtonDown) { IsCrosshairVisible = !IsCrosshairVisible; } if (IsCrosshairVisible == true) { IsCrosshairVisible = true; } else { IsCrosshairVisible = false; } } void OnGUI() { // draw the crosshair in center of screen if (IsCrosshairVisible) GUI.DrawTexture(crosshairRect, crosshairTex); } }

  • Thanks for the tutorial. It really helped me to move forward my project. Here is a tip:- Instead of placing cubes around the environment for player. just get a point from ray at a distance. Ray ray = _cam.ScreenPointToRay(screenCentrePoint); debugTransform.position = ray.GetPoint; GetPoint will give you at point on the ray at the distance you have given. so even if player is aiming at the sky it will work without placing collider around environment.

  • Can someone help me i am stuck at this error : my player doesn’t shoots whenever i try to shoot this error pops up: MissingReferenceException: The object of type ‘Transform’ has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object. UnityEngine.Object.Internal_InstantiateSingle (UnityEngine.Object data, UnityEngine.Vector3 pos, UnityEngine.Quaternion rot) (at <2d8783c7af0442318483a199a473c55b>:0)

  • Great walkthrough CM. I was wondering if you experienced problems with the mixamo weapon related anims. Im experiencing a problem with ALL the weapon/aim anims from mixamo when applying the ‘aim’ animation layer mask weight to 1. Before applying the weight the character is facing straight forward in the idle animation like normal but when i make the weight 1 and activate the aim anim the character does not aim straight forward but to the left. So he goes from facing north to facing north west when the animation layer mask is applied. When setting up animation rigging to correct this the character just falls halfway into the ground and doesnt perform the idle animation but instead is just frozen in a weird pose.

  • Can you make a article on how you polished everything at the end? Because I have the animations and functionality down, but it would be very helpful if there was a article showing how to add for example a walking animation while aiming, all the FX used and so on. Other than that this article was great and really helpful 🙂

  • if this not work correctly: Vector3 worldAimTarget = mouseWorldPosition; worldAimTarget.y = transform.position.y; Vector3 aimDirection = (worldAimTarget – transform.position).normalized; transform.forward = Vector3.Lerp(transform.forward, aimDirection, Time.deltaTime * 20f); Just use this: transform.rotation = Quaternion.Euler(0, Camera.main.transform.eulerAngles.y, 0);

  • Thanks for the tutorial. But I have a question in the Animation section. I followed the steps like you showed at 29:20 and gave the “Aiming” layer a weight of 1 but for me it still is in the Idle animation of Base Layer. I can see that the Pistol Idle animation is playing as that blue line of progress runs on that state, but in the Game window, the character doesn’t actually follow that animation but rather is still in the base layer idle animation. Any ideas as to what could be the issue here? Thanks.

  • if you feel that the camera lags when you move the mouse, you can try this solution found on Unity forum : 2021.2.7 uses version 1.2 of the Input system package which has an issue with inputs delta when set to fixed update and can cause the lags you are seeing. To check if that’s the issue you could try this: Edit -> project settings -> Input system package If Update Mode is set to Process events in fixed update change it to Process events in dynamic update I hope this will help you and thank’s for this tutorial 🙂

  • Code Monkey, you have outdone yourself. This is so fantastic. It also provides a great framework to expand upon. Thanks so much for providing so much learning for no cost to the viewer! Youre doing the community such a wonderful service. We are all so very grateful for your time and hard work helping all the little guys and gals out there trying to get better! Thanks!

  • Hello code monkey i am facing a problem in my unity editor.There is a compiler error from a script that i didn’t create and i don’t know how to fix the error and when I open my asset in package manager it shows a error and then crashes i am using unity 2020.3.3 please tell me how to fix these problems i am just a 12 year old boy and i really need unity to create a game

  • I was going to make a system based off of the article “How to make ALL kinds of GUNS with just ONE script! (Unity3d tutorial)” by Dave / GameDevelopment @davegamedevelopment but it is done in the Input.GetKeyDown system, how can change that system to use it on the unity starter assests input. Could you make a article like the article I showed but for the new system because I really want the stats to be easily changeable, as there will be many guns in my game. Thanks!

  • 14:26 A more simple solution if(Physics.Raycast(ray, out RaycastHit raycastHit, 999f, aimColliderLayerMask)) { debugTransform.position = outhit.point; } else { debugTransform.position = ray.GetPoint; } When there isn’t a collider in front of the player, the target point will be a little bit away from him if you write this code.

  • I just wanna point out this guy still answering questions in more than a 1 year article. True Legend!!! in 18:40, I want my character to be constantly fasing the way I’m looking and don’t have an aim function. So I just used the code out of if statement and still works great! My only problem is, because player is actually looking to raycasted object, for example if I push my right shoulder to the wall and look at the wall, because of the perspective, object actually moves behind the character and causes to player to actually look back. Is there a possible way that I can fix this?

  • Hey, I have a doubt. We can’t use your project files for commercial purposes, right? As they are part of the Synty battle royal pack and to use your project files commercially, we would need to get that pack right? If yes then it will be nice if you mention this in your article so that everyone is aware of this.

  • Hey @CodeMonkey Bhai mai ik game bana raha hu, so i want that can you make a detailed article on “Infinite Procedural terrain generation” and ” How to make animation of NPC’s Like GTA-6 “that they are interracting with temselves like a real human . In terial is See that the NPC’s are passing WaterBottels And Playing Basketball . And Like I give an example If The Frankline Goes To A Rich Colthing Shop the Owner Call The Police But Don’t call Police When tere is another Game Character And Like If In Eveing You Comes Near To Girl It calls Police and Police Caught You Like That . Please make article on it .

  • Hi @codemonkey newbie here, I have been trying to modify the movement script so that when the player presses A or D, the character doesn’t rotate, instead, the character just moves to the side without rotating, so, aiming to the front all the time but still moving to the side, like a strafe motion. But I have failed. Would you please give me a hand?

  • the following is not working correctly for me. I don’t know why it worked in the article. lo siguiente no me funciona correctamente. No sé por qué funcionó en el article. if (hitTransform != null) { if (hitTransform.GetComponent() != null) { Instantiate(vfxHitGreen, transform.position, Quaternion.identity); } else { Instantiate(vfxHitRed, transform.position, Quaternion.identity); } } pero lo reemplace por if (hitTransform != null) { if (hitTransform.GetComponent() != null) { Instantiate(vfxHitGreen, mouseWorldPosition, Quaternion.identity); } else { Instantiate(vfxHitRed, mouseWorldPosition, Quaternion.identity); } }

  • I’m having Trouble with the Shooting Projectile step. Instead of flying where it’s supposed to, my bullet always flies into the direction opposite the way the character is facing on spawn, and also it doesnt fly straight on but downwards in a diagonal manner. Use Gravity is switched off on the Rigidbody. If anyone can help it’d be much appreciated. In the time being ill use the raycast method instead, but for the final game i want it to have the bullet projectile. Thanks in advance EDIT: fixed it myself. Feeling really dumb right about now but in general this is a really great tutorial 🙂

  • HI codemonkey, I ran an into an issue towards the end of the tutorial, when I added the pistol idle animation on the player the bones were altered slightly, certain bones and the animation itself was altered, which ruins the whole thing, I’m really not sure how to solve this problem, I’ve moved every slider and clicked every button and have performed a thousand google searches, do you mind helping?

  • I can see a bit of a flaw in the execution here, what happens if you stand directly to the left of a pillar? The camera & crosshair will be in front of the pillar, and your bullet will fire backwards. I’m not sure what the best solution would be though, perhaps offsetting the starting position of the raycast forwards to the minimum distance in front of the character/camera that you want them to be able to shoot?

  • Thanks for great tutorial! How would you handle states with that? Do you think Aiming should have different states? Like, Idle, Moving, Jump, Crouching, Aiming? Do you think its necessary for that? Since aiming if elses getting complex in time, I thought FSM would be cool but i couldnt discriminate them

  • Hello Code Monkey and everyone, can you guys give me some solutions about why do the bullets i fired falls down to the floor instead go straight to the target crosshair? I have followed all the tutorial in this article from 19:31 to 24:00 and still can’t figure out what i missed. Every answer you guys give will mean a lot to me. Thank you before.

  • How to avoid the character rotating on itself when you are really close to a wall ? For exemple if u aim when really close to something with the “bullettarget” script on it, your character will start to rotate for no reason on itself, any idea ? I think there is something to do with the mouse raycast but i can’t figure what to do 🙂

  • Getting a few errors. 1) (Unity 2021.3.1f1) won’t import Pro Builder 5.04 (Cannot fetch autohrization code) 2) Assets\\ThirdPersonShooter\\ThirdPersonShooterController.cs(6,19): error CS0234: The type or namespace name ‘InputSystem’ does not exist in the namespace ‘UnityEngine’ (are you missing an assembly reference?) 3) LWRP error? how to fix using reference? 4) Assets\\_\\Base\\BaseScripts\\Characters\\PlayerLookAt.cs(30,18): error CS0111: Type ‘PlayerLookAt’ already defines a member called ‘Update’ with the same parameter types 5) Assets\\_\\Base\\BaseScripts\\Characters\\PlayerMovement.cs(48,18): error CS0111: Type ‘PlayerMovement’ already defines a member called ‘Update’ with the same parameter types

  • i need i simuler system but with few meagers changes for my game 1. i want the recast where rooted the weapon 🔫on empty point not in the mouse postion ther are multiple reasons for that reason 1. my game have split screen support the that means that wean use the split system the whole system become broken reason 2. and the reason i want to use empty objects and not camera its because i want to use this for my weapon and not brakes the animation for my weapons because i have plan to use this on fps weapon in my game and one last thing way you don’t have discord website ? how i will able to show you the reference image in the order for you to understand what im try to create ?

  • The code for the 3rd person controller was modified recently and when adding the code for sensitivity, I keep getting this message: “There are inconsistent line endings in the ‘Assets/StarterAssets/ThirdPersonController/Scripts/ThirdPersonController.cs’ script. Some are Mac OS X (UNIX) and some are Windows. This might lead to incorrect line numbers in stacktraces and compiler errors. Many text editors can fix this using Convert Line Endings menu commands.”. Any help with this issue?

  • Well murphy’s law strikes again, this is the error that I get. I have tried everything but apparently only commenting out line 57 where is the Instantiate, works and idk why Assest\\starterAssets\\ThirdPersonController\\Scripts\\ThirdPersonShooterController.cs(57,45): error CS1503: Argument 2: cannot convert form ‘UnityEngine.Transform’ to ‘UnityEngine.Vector3’

  • Hi I wana ask for something if i using UI Canvas for mobile and i wana lock a button but keep the same solution . For example, when I press the button, I want the player to remain in the aiming position until I press the button again, and I want the joystick to release and move the camera at the same time, as in mobile games. I need just the way how can i do this If graciously

  • Awesome tutorial. I was able to follow beginning to end as a complete noob. Took a little more time, but i did it haha! I’m stuck on the animations with Mixamo however, I uploaded the unity character model and used it as the skeleton but the animation doesn’t seem to actually trigger. I can see in the animator window where it tries to, however!

  • Great tutorial, but you gotta slow down mate, between your accent, fast talking and moving script lines (copy delete paste), it gets difficult to keep up. Several times I missed script lines because of this. But thanks for taking the time, it was informative, if very stop/start for me, in order to keep track. And don’t start on the pause the article, your ads cover scripting lines a lot. Cheers, and thanks again.

  • While this is cool, the avatar mask for the Pistol Idle animation has a hip rotation that isn’t used when turning off the legs and their IK, meaning that the character aims to the side instead of straight ahead, regardless of what you set in the animation itself (Body Rotation or Original) Is there a way to correct this?

  • Hello sir, what hit effect package yoy are using and i imported the animation from mixamo properly but when i am assigning the rig model of the project it is showing transformation deosnt match i have tried to separate animation only from the fbx file it showing no error still not playing any animations if you help i can procced to next lessson. Thanks.

  • for those wanting to make an automatic weapon, here’s what I did (idk how much it’ll help since I’ve changed the code quite a bit since following this tutorial) 1) add 3 variables to the top of the script: private bool isFiring = false; float shotCounter; public float rateOfFire = 0.1f; 2) in update, add this where you’re instantiating your bullet: if(starterAssetsInputs.shoot) { isFiring = true; } else if(starterAssetsInputs.shoot == false) { isFiring = false; } if(isFiring == true) { shotCounter -= Time.deltaTime; if(shotCounter <= 0) { shotCounter = rateOfFire; Vector3 aimDir = (mouseWorldPosition - spawnBulletPosition.position).normalized; Instantiate(pfBulletProjectile, spawnBulletPosition.position, Quaternion.LookRotation(aimDir, Vector3.up)); } } else { shotCounter -= Time.deltaTime; } I learned this from this article 🙂 youtube.com/watch?v=1Ot99XlcL1M hope it helps <3

  • For 8:10, my lines are different: if (_input.look.sqrMagnitude >= _threshold && !LockCameraPosition) { //Don’t multiply mouse input by Time.deltaTime; float deltaTimeMultiplier = IsCurrentDeviceMouse ? 1.0f : Time.deltaTime; _cinemachineTargetYaw += _input.look.x * deltaTimeMultiplier; _cinemachineTargetPitch += _input.look.y * deltaTimeMultiplier;

  • Hi Code Monkey, thank you so much for this tutorial! I’m a web developer and it is crazy to see how different game design is to that, but I feel like this is such a great intro. I do have one question though – at 29:24 as soon as I set the weight to 1 nothing changes on my animation, same for when it aims – the weight changes correctly but it’s like it can’t override the animation for the base layer or something like that?

  • When I try to add your package to my project in Unity 2021.3.3f1, I get this error that says BlurForwardRendererData is missing RendererFeatures. I’ve been trying to solve this problem for a while now but I’m pretty stumped. On the Blur Forward Renderer Data (Universal Renderer Data) scriptable object, the error it gives me under “Renderer Features” is “Missing reference, due to compilation issues or missing files, you can attempt auto fix or choose to remove this feature.” Auto fix doesn’t do anything, and I’m guessing whatever is missing is needed to get the effect for the bullets to work. Has anyone found a solution to this? I also imported ProBuilder and enabled Experimental Features.

  • this is useful until he says “i made this previously”, to which the viewer is left hanging. He does this all the time in his articles, and it is so frustrating. I love the vids, I learn a lot, but I wish he’d just remember that making vids for newbs means that something super basic for him may still be unknown for we newbs.

  • I can’t get the pistol idle anim to work. Im using 2020.3.16, and I’ve applied the animation to the player object with the animator setup exactly the same way but the animation doesn’t play when I hold right click to aim. In the inspector during runtime it shows the weight automatically being set to 1 even though I have it set to 0 by default in the editor, and it stays like this even with the weight setting code removed. Any idea what the problem could be?

  • Assets\\ThirdPersonShootingController.cs(51,35): error CS1061: ‘ThirdPersonController’ does not contain a definition for ‘SetRotateOnMove’ and no accessible extension method ‘SetRotateOnMove’ accepting a first argument of type ‘ThirdPersonController’ could be found (are you missing a using directive or an assembly reference?)// Getting this error when I typed in the code exactly like on the article??

  • Wonderful article, very helpful. The way you have us set it up currently it makes a bunch of particles in the scene, which isn’t super bad, but leaves a big mess, Ideally I’d like the particles to destroy once they’ve played through. Also, not really important, but the camera is restricted to only looking so far up or down and I haven’t figured out how to adjust that yet.

  • Great article! I was able to get the basic configuration up and running without any issue. However, I would like to use a rifle similar to your final demo. How can I use a “Rifle Idle” animation while implementing the Third Person Controller. I attempted to add a “Weapon” layer with a “UpperBody” mask, but could figure out how to get the “Rifle Idle” animation to play if an “Armed” bool parameter was set to true. So basically, if “Armed” is set to true, the “Rifle Idle” animation would play on the upper body of the character.

  • when I hit play the PlayerFollowCamera is set to PlayerAimCamera, it should only be PlayerAimCamera when I click Right Mouse Button. The PlayerFollowCamera distance is 4 and PlayerAimCamera distance is 2.5 but mine is stuck with PlayerAimCamera. What am I doing wrong ?? I put the same code though as was shown

  • took me a while of learning c# and unity to understand why i cant watch/learn from your articles, every tutorial i have seen from you, you tell us to watch the previous article multiple times per article AND even in those “previous articles”. Then you also spend time editing in and advertising your previous articles instead of going more indepth and editing in some visual explanations and meaning of your arguments on what we’re currently doing. time spent copy/paste advertising instead of time spent making a more quality tutorial The properties, and the flow of the overall script, what you’re doing is simple (sometimes), but somehow you’re so amazing at abstract solving that everything i have seen you create becomes too complicated to just implement and create something that works. one time i tried to make something from your tutorials, and 2 hours later i had 5-6 of your articles open, via your recommendation. (if you dont know what that is, watch your previous article) I watch another youtubers article, they start with a blank sheet, or keep the scripts separated, allowing us, the viewer, to choose whether to add it onto ours, or just use it for study reference (again, this is from a beginner, tutorial watcher perspective). Plus, looking at all of the pre-typed code at once is just overwhelming and can distract us from the point of the article. But, you are actually so good at code and have so many tutorials and are so dedicated that I have to watch your articles because you cover topics that no one else does.

  • Hello Code Monkey, really great tutorial. I am having a hard time trying to make the Bullet shoot with the BulletProjectRaycast to work like you shown at the end of the article. Do you mind making a short article on how we can do the 3rd route where is a mix of both? Also I am willing to pay for a complete 3D Shooting course or even a tutorial for the last piece of this article where you have that 3rd route, the trail, and better animations. Thank you!

  • dude thank you so much for this!!! I’ve been pulling my hair out for months trying to figure this new input system out and though I’m still reluctant to say I figured it out, I definitely made progress finally today with combining what I’ve been trying to do with what you did here… Thank you so much for this upload! You’re making dreams come true my friend!

  • Thank you for the great article! I had a problem with the camera jumping around, and it turns out that since I was using the freelook camera, the camera was rotating much slower than (and independently of) the camera target, which caused a desync that looks really weird when going into aiming mode. So there seems to exist a hidden assumption here that you should use the virtual camera unless you want to make some additional changes to the code. Just pointing it out if anyone else wants to experiment like me. Thanks for the great article again 🙂

  • Any chance you can explain the upper body animation portion, how do you aim up and down with the character? You helped by making the forward direction of the transform face the direction of the cursor but how do we make it face up or down for just the upper body? Can you give me a clue on how to start this please? Thanks..

  • For the bullet, I have to keep its velocity fairly low otherwise it will pass through thin game objects or collide inside of game objects. Looking around, the advice I constantly see given is to set the collision detection on the rigidbody to Continuous/Continuous Dynamic, but I’ve already done that. I certainly can’t make it move as fast as in your article. Any ideas?

  • project not usable. Bad idea use original assets and modify – have conflicts. I try lot of assets, and cant replace some files. Why not just rename your assets? Create new project for ever per random sh/t = horrible. sorry bad english. Also when create new project have lot of problems. //Sure “code monkey”

  • So, i’m having a little trouble with the code at the “Shooting Target Position” segment. The point does hit, and the transform follows camera. However it does not follow at the center, and the transform moves towards the camera. I dont understand what the problem is. This is my code: Vector2 screenCenterPoint = new Vector2(Screen.width / 2f, Screen.height / 2f); Ray ray = Camera.main.ScreenPointToRay(screenCenterPoint); if(Physics.Raycast(ray, out RaycastHit raycastHit, 999f, aimColliderLayerMask)){ debugTransform.position = raycastHit.point; } else { debugTransform.position = ray.GetPoint; } Am I missing something?

  • animation isnt working for me, for some reason when i import the animation everything is still fine but when i do every step the animation just doesnt work, i finally got the bar under the animation to actually appear but it goes once and thats it, the weight doesnt help, and when i looked at the animation it was someone in a wierd breed between a sitting and fetal position. help pls

  • Hey bro The 3rd way of shooting…..I did it in my game and it’s cool But I wanted to ask How did u TakeDamage of enemy….cos I noticed using OnTriggerEnter() when the speed of the bullet is very high doesn’t detect everytime I just want your recommendation Is it better to do it with raycast like how you added explosion force???

  • when following the tutorial, everything is smooth, but after setting the aimSensitivity Script the camera jitters. I have the same problem with a different project where the camera just start jittering (i have 300 fps, my computer is strong enough). does anyone know how to fix it? i think it’s some kind of unity bug, can’t be the code, i only followed the tutorial. Thanks.

  • Im using same code from this article for shooting in my project, i add the cooldown for automatic shoot(when hold left mouse, gun shoot every 0.3 second ) with ienumerator inside the shooting method, however when i add the ienumerator, my in game mouse is jittering, not moving smoothly, how can i avoid from this any idea ? sorry for bad english

  • I did the exact same thing but my raycast is flickering from Center to down. I mean in the beginning it is centered but it Looks like it’s getting a New point slightly below and is gong back to Center. It’s repeating this so the is A gap between Center und below the Center. The sphere is flickering between these 2 points. What ist that?

  • So how do you stop this thing from completely turning around instead of running backwards ? If I hold a S or Down arrow i Don’t want it to do a complete pivot around. I want it to instead move backwards. Also I want to be able to toggle the run on and off from walk. Second how do you fix this cameras system from the loose slide control and give it the option to for scroll view into third and first person views? I fond nothing with these specifics.

  • I am not sure why but I am unable to aim. I followed the directions for the first 7 minutes but when testing the aim mechanics along with the article I am unable to aim. I have no errors in the scripts. Also the game camera only shows the PlayerAimCamera instead of the PlayerFollowCamera, and pressing LeftMouseButton does not affect the camera at all. I have restarted twice and both times I had the same problem, I made sure that thoroughly follow the article but still had the problem. I am a beginner when it comes to unity so I am not sure how to problem solve this issue.

  • what if instead of using projectiles as your shooting mechanic you instead made them aesthetic and managed hit detection with hit scan. I could be wrong but thats what it looks like call of duty did in the early modern warfare games( 1, 2 and 3) obviously the huge difference is COD is FPS and this is 3rd Person

  • After we fixed the bug with the two third person controllers, my unity had a problem with calling set rotate on move, after 2 hours of combing through the code, my character would be always facing Zero x,y,and Z, I changed one line and it opened every app on my computer then crashed. Will be returning in the morning.. haha

  • Is this article obsolete now? When editing their third person starter script, there’s literally segments stating “Do not use this, do not use that, do not use delta.time. Namespace can’t be found..” And this article tells us to use it. I tried, coped step by step, word for word, and the game refused to run, red errors throughout.

  • Hi I am facing an issue. After implementing the shooting projectile method, when I enter play mode, the bullet gets instantiated and then it is destroyed, when I fire again it doesn’t reinstantiate and gives error that the referenced prefab have been destroyed, can someone help me with this Code monkey do you have any idea what I’m doing wrong ??

  • Thanks for the brilliant tutorial CodeMonkey, I have one question about the aiming ray cast, if I don’t setup the invisible colliders above and around my scene, what happens is, while aiming, if that raycast is not getting a hit, my rotation movement doesn’t happen until the raycast collides with something. Would this be considered normal behaviour? everything else is working fine. I’m not shooting projectiles, just using the raycast hit method.

  • I am getting this error when opening the “ThirdPersonShooter” scene: 1. Problem detected while opening the Scene file: ‘Assets/ThirdPersonShooter/ThirdPersonShooter.unity’. Check the following logs for more details. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) 2. Prefab instance problem: UI_Canvas_StarterAssetsInputs_Joysticks (Missing Prefab with guid: 2f7f3dde7ae722a4aafffe20691ad702) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) Using Unity 2020 LTS as you used in the article. Hope you can help, thanks

  • Please help me I get NullReferenceExeption at third person shooter controller. the line is if (starterAssetsInputs.aim) { aimVirtualCamera.gameObject.SetActive(true); thirdPersonController.SetSensitivity(aimSensitivity); thirdPersonController.SetRotateOnMove(false); animator.SetLayerWeight(1, Mathf.Lerp(animator.GetLayerWeight, 1f, Time.deltaTime * 13f)); I cant figure it out for the life of me. Thanks

  • Please help I cannot make the sensitivity part to work no matter how many times i checked for mistakes…whenever I add this line ( thirdPersonController.SetSensitivity(aimSensitivity);) i get this error —- NullReferenceException: Object reference not set to an instance of an object ThirdPersonShooterController.Update () (at Assets/Scripts/ThirdPersonShooterController.cs:29) ive tried Time.deltaTime //Don’t multiply mouse input by Time.deltaTime; float deltaTimeMultiplier = IsCurrentDeviceMouse ? 1.0f : Time.deltaTime; didnt worked then this: _cinemachineTargetYaw += _input.look.x * deltaTimeMultiplier * Sensitivity; _cinemachineTargetPitch += _input.look.y * deltaTimeMultiplier * Sensitivity; didnt worked. What I am doing wrong. I managed to fully implement this tutorial on my dead laptop previously but i cannot now?:(

  • Hey CM, starting this up now and it’s telling me that the assets are deprecated. I proceeded anyway, and it’s also telling me that the CineMachine ThirdPersonFollow along with a multitude of other components/functions are deprecated. Will this affect the outcome at all and/or is there an alternative since Unity has deprecated the packages?

  • OK I’m a little stumped on this one. I followed the projectile scripts – no errors – but the bullets have a range of issues that I don’t understand. 1) They’re not spawning from the spawn point – despite me putting it in the middle of the player it’s spawning on the right side of the screen. 2) The bullets don’t go forward – they just spawn – and drop to the floor What’s really annoying me is I don’t know where the issue even is, is it the projectile that’s messing up? the thirdpersoncontroller or maybe the colliders are blocking the bullets somehow (which would be strange because the spawn point is not inside any colliders I checked). Hell maybe it’s even the code in the StarterAssets I just don’t know. Just to clarify – the bullet is spawning (not where I told it to) and not moving forward but dropping straight to the floor with gravity. Thanks in advance. FYI my camera is more in the centre then the one in the article – I wondered if this might be relevant

  • I’m having issues with the player’s jump, aiming, and projectiles. When I aim the player faces at the camera and the movement is I think reverse. When the player jumps, it keeps jumping and not landing back on the ground. For the projectiles, they’re not shooting forward. I turned off the gravity, but now the projectiles are floating. I’m not sure what’s going on; even though I put in the code correctly.

  • “If I use bullet projectiles, some guns have high bullet speeds. Sometimes, collision detection may not be accurate, and the hit effect position may be off due to the high speed. People on the internet suggest using raycasting, which is considered the best method. However, with raycasting, I can’t control the speed. Can anyone help me understand how I can achieve different bullet speeds for different guns?”

  • hello sir! At the end you show third way of Shooting and you made SetUp (Vector3 targetposition). i Want you to ask you which parameter you added in targetposition. mouseworldposition or other please help me or other and how you add it .when I’m calling the ProjectileShootRayCast script in other class other class not getting that ProjectileShootRayCast script class please help me.

  • First of all i got to thank you for this great tutorial but i have this 1 issue, i didnt quite understand the last part from demo scene where you have more scripts and objects etc… i tried to download project files but i only got an error that says ” ‘PlayerArmature’ AnimationEvent ‘OnLand’ on animation ‘JumpLand’ has no receiver! Are you missing a component?” and i just dont know how to fix it, if you or anybody else knows i need your help

  • I know I’m a month out, but can someone tell me how to use the “aim” button as a toggle with this input system? (on/off using the same button). I have a basic grasp of the invoke methods of the new input system, yet for some reason, I cannot get my head around toggling bools using the crazy amalgamation with the send behavior script that is in this controller.

  • Great tutorial. I would have taken the approach of maintaining the Manny AnimBlueprint when you character does not have a weapon equipped, then toggle within the ABP using an equipped Boolean variable. This way you get the best of both worlds ! Also, love how you did the aim offset. Had no idea you can do that. I prefer to create an AnimOffset then dropping in the AO animation sequences (if you have them)

  • I have the half of the 5 hours zombie game that u did, and I learn a lot, but can do a tutorial of how to do animations on blender and putting in unreal in a character, cuz it’s crazy how I don’t see any tutorial in YouTube that explain specially, I want to add uv mapping, and lot of animations, or maybe do u know some uddmy or domestica this type of plataforms to know about the characters and animation(?? I don’t like mixamo cuz it’s easy, and I want to upload my own zbrush characters that cross to substance then blender then unreal

  • Amazing tutorial, however: At 32:50, you don’t have to delete the BS_Jog. If you do the same as you did with the Locomation-Walk/Run animation (bring in BS_CrouchWalk and blend poses by bool), then it will give you a better effect, in my opinion. Your character’s posture won’t be straight like a board as if he’s about to fire a heavy machine gun. Of course, if you’re making a game where your character is a robot, then this is the perfect posture for that. It reminds me of The Terminator.

  • Hey is there anyone who can help me figure out what’s going on with my animation blueprint? I’m using the enhanced input to change the crouching variable to true which should activate the crouching idle pose. It looks like it does but in-game the player only crouches when moving around. I’m changing the crouching variable to true using the input which should activate the crouching idle pose. It looks like it does but in-game the player only crouches when moving around

  • I made it smoothly to 19:00 and i have a question before I go any further, If my goal is to have the unarmed animations(for idle, sprint, crouch, etc.) active before picking up any weapons. Whats your best suggestion to achieve that while still following the rest of this tutorial? Apologies if you talk about that later in the vid haha

  • Hi, i was curious I just completed your TPS Multiplayer shooter tutorial. Would i just code the stuff i am missing from the earlier tutorial into the existing TPS online? Also i was wondering how would i go about getting TPS shooter but i want to put in first person also as how some games are if you double click right it changes it into first person perspective.. and with the meta human does your older converting meta human in ue5 does is it still the same way for 5.4? Thank you for everything and if you are unable to answer i understand, anything advice helps a lot.

Pin It on Pinterest

We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.
Accept
Privacy Policy