I’m making a FPS game that needs a gun with zoom, reload and fire animations, jumping/crouching, etc.
Is the default FPSController a good place to start, and extend the FPSController with some custom scripts?
I see other users creating a Capsule and attaching all the custom movement scripts to it:
example: Unity 3D:First Person Shooter Moving and Looking - YouTube
example: How to construct a simple First Person Controller with Camera Mouse Look in Unity 5 - YouTube
My concern is that the FPSController that comes with Unity5 might not be easy to extend, even though it’s pretty robust.
Some of the functionality I need:
- Gun that stays in the camera view
- Weighted gun movement (gun moves around slightly when looking around)
- Zoomed view down the scope
- Crouching
For those who have been down this path already, what would you recommend, extend FPSController or DIY controller?
***EDIT:
Thanks for all the collaboration guys, I really appreciate it.
I have been investigating the various strategies to make a good FPS controller with animations, etc. I figured this is such an important part to having a fun FPS that I wanted to make sure I didn’t go down the wrong path up front. After digging through lots of free resources, I have found a couple key points compiled here.
TL;DR: Make a simple Controller first, then extend the UnityFPS controller once you understand what’s going on, finally look into buying a prefab once you know what to look for and what you’ll need in your game.
- There really isn’t a “right” way to do anything because there are so many ways to achieve similar functionality/look in the FPS.
- There are many FPS-ready packages available for download that do a lot of the common tasks like handling movement, weapon animations, and various other functionality you may or may not need. The most popular FPS is probably UFPS which is a pretty heavy package (also $80) that does a TON of stuff you will eventually need in your FPS. Their “secret sauce” with how fluid it all looks is by using procedural animations (a spring system that “pushes” and “dampens” forces from player input and movement:Reddit - Dive into anything, you can read about it here: https://docs.google.com/document/d/17Ns3PwlSWg4kqWwnBZ4DRa9n_LMSOe7m3KzMfsPUGBI/pub?embedded=true#h.69r4j1rrvafw
- If you are interested in making your own FPS or using another FPS package, I would first make a simple FPS controller from scratch from the many tutorials online first. Once you know how to make a very simple FPS, you can start to think about how complex you want your animations to be and your skill level. Sometimes pre-made FPS controllers may seem like the right choice at first but then you quickly hit limitations with how they are implemented and don’t have an easy way to extend…in which case it would have been better to just start your own from scratch.
- There are several items that really add a nice feel for a FPS weapons, like gun sway (the movement of the gun as you look around and move around), bobbing (slight gun bob when you are idle, head bobbing when you walk etc), Depth of field/Blur on movement effects (these are easy to implement).
- Let me know if you are interested in making your own FPS controller and I’ll see if I can throw something together on youtube.
Here are the best tutorial resources I found along the way:
-
Create Multiplayer FPS from scratch (2014, 3 part series from Unity): Asset Store Basics - Unity Learn
- Teaches you the basics without getting bogged down with all the nice “polish” features that take 80% of your time but only add 20% value.
- The guy is a great teacher and doesn’t go too fast or slow.
- Multiplayer included!! (Most tutorials i found don’t go from start to actual multiplayer)
- Only uses one paid prefab for a muzzle flash, not necessary to complete the tutorials though.
-
Create a simple FPS controller (2016): How to construct a simple First Person Controller with Camera Mouse Look in Unity 5 - YouTube
- The gal is a GREAT teacher. very clearly explains the concepts. awesome British accent.
- Part of a paid series on Udemy. Probably worth buying.
- Short video (only 20 minutes)
-
Another DIY FPS Controller (2014, 3 parts) Unity 3D: First Person Shooter Adding Guns And Shooting - YouTube
- A young fellow teaches, he’s pretty entertaining and seems to know what he’s doing.
- Discusses topics like shooting, bullet fragments, bullet holes on walls, aiming down the sight, etc.
- Gets you started but doesn’t seem to have a cohesive tutorial series, missing parts from part 2-3.
-
Getting started with the Unity FPSController (2015): Using the new FPSController in Unity 5 - YouTube
- Short video with quick explanation.
-
Getting started with UFPS: - YouTube
- Gives you a good preview of what UFPS offers if you want to go that route.
-
Using Blender to import guns and animations:
-
Importing Blender objects into Unity - YouTube
Other resources:
-
Importing Blender objects into Unity - YouTube
-
Adding Depth of field: Unity Tutorial - How to Add DoF and other Image Effects - YouTube (Unity has a pre-made Depth of field effect!)
-
Adding Zoom: Unity Tutorial 1# - Camera Zoom/Scope Effect (Unity Indie/Free) - FNGames - YouTube (it just modified the Field of view)
-
Adding Gun sway: Unity 3d Tutorials - Programming - #6 Sway Effect - YouTube (this is the “easier” way i found, moderate complexity script)
-
Aiming Gun view: - YouTube (simple script)
Models/Packages I found along the way:
- BattleOfUnion FPS guns: Unity 3D FPS kit Free - YouTube
- RealisticFPS Prefab Package: Unity Asset Store - The Best Assets for Game Making
- CZ805 (BF4 gun), nice animations: http://tf3dm.com/download-page.php?url=cz805-bren-a1a2-with-animation-64107
- Full Character rigged model: free fbx model soldier military character rigged