- Home /
What is the best way to move a character for an FPS?
I recently started learning Unity, and decided to try and make my first 'game'. The only problem I'm having is deciding how to move my character, there are so many options! Should I use FixedUpdate or Update? Should I use RidgidBody or CharacterControler? There are a lot of possibilities. I haven't been able to find a definitive answer to this question. All I'm trying to do is create a basic 3DObject that the player can control.
no is pry answering cause its not a specific question. you are asking "how to make a game". this is to braud for someone to give a simple answer. you should use google and find a walkthough or tutorial for a FPS game and follow it. if you are needing a specific answer reguarding one of the many Components / functions you mentioned you should ask specifiic questions after reading about that component or function and knowing what it is. generally if you are moving something that is expected to use collisions or the phyisics engine you would attach a rigidbody and move and change its velocity in the fixed update function. a character controller gives you a bit more options and sometimes smoother movement if you need it.
Answer by Shrikky23 · May 17, 2017 at 10:54 PM
First understand the difference between FixedUpdate and Update. FixedUpdate is used mainly for fixed calculations where as Update is used for all the general calculations. Learn more about the differences between FixedUpdate/Update and Time.DeltaTime and Time.FixedDeltaTime in the unity docs. It is very important you understand what Time.DeltaTime signifies for calculations.
The idea way would be to use Rigidbody, learn basic 3D math and how to use Transformation in Unity, basic introduction to Vector3, Transform.Position, Transform.Rotation (Use Quaternions for rotations) and Input.GetKeyDown commands would help you build a Movement script easily.
Though Character Controller is readymade, comes with collider, jump script etc, I wouldn't prefer that as over time you might want to modify a lot of code to get desired ability. When you learn the basic 3D math and build things yourself, your knowledge will be deep and any tweaks would take only seconds as you know your code and you know the concepts. If you want to be a programmer learn the concepts and then use readymade content only if needed.
Do a quick search on all the important keywords I mentioned and get started ! If you are a designer/artist don't go too deep. Hope this helps.
Your answer
Follow this Question
Related Questions
How to make my Character run through walls with the use of the Character Controller component 1 Answer
Smoother dash with a Character Controller 2 Answers
How do I stop my character from sliding after adding force? 0 Answers
How can I make my FPS player move towards the direction it is facing 1 Answer
Continuously rotate a gameobject on 1 axis perpendicularly to another gameobject's normal? 1 Answer