Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Pikaroo · May 18, 2017 at 11:06 AM · fpscharacter controllershooterridgidbody

Character Controller vs RigidBody for FPS

This is a pretty simple question, but I have not been able to find a definitive answer. I was wondering for a first-person-shooter game should I use a character controller or a rigidbody. I'm still learning about Unity and trying to find the pros and cons of each.

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image rad1c · Jun 06, 2017 at 01:36 PM 0
Share

I cannot give you a perfect answer. For a "technical understanding", read the 'Description' part of both in API docs. $$anonymous$$y experience: Rigidbody is VERY painful to make work properly AND smooth, especially for FPS (struggling with this right now btw) control. But from the moment it works, Physics will do everything for you so no more hustle (and this is exatly why I decided to swallow it and struggle with it). On the other hand, Character Controller is super easy to make work, be smooth, etc, but if you want proper collision, falling over, getting crushed by a piano dropped on you, etc, problems start emerging. It also acts sloppy when it comes to collision. It reacts but on an unrealistic ("non-physics" way). $$anonymous$$g. if the player bumps into a chair it won't kick it over but walks over it (if can -slope-, otherwise gets stuck in front of it) etc. So I$$anonymous$$HO: go for CC if you don't plan anything strictly physics-related with the character and happy to "hack" exceptional cases if and when needed, but go for Rigidbody if you want physics to be in control (yet ready to struggle for days or weeks to make it work properly)

avatar image Cherno · Jun 06, 2017 at 04:53 PM 0
Share

Use a CC. It makes things much easier and behavior like pushing or being pushed can easily be added if needed. a RB complicates things alot because it will push even large, heavy objects if the character runs into them, which will probably be a problem in the game if your little soldier pushes a tank around.

avatar image rad1c · Jun 06, 2017 at 05:18 PM 0
Share

@Cherno Like I described... It's a decision. Commenting to note that what you state, "your little soldier pushes a tank" is just not true. If your soldier is 100kg and your tank is 90 tons, your soldier will never push it anywhere. Because of physics... this is what RB is all about. On the other hand, if one goes for RB and faces an issue like that, has to "hack" indeed to make one thing immovable to the other, but not for the rest. $$anonymous$$g. a magic ball that the player can kick away but ignores wind. In this case, could raise the weight of the ball, or temporary set things kinematic, etc. So "cheat physics" basically. Yet, if physics is a must-have for a game, CC will be nothing but endless simulations, workarounds and hacks with a snake code base, legacy on day one.

So I'd stay with "depends" and "whatever the game needs". So I still think my original comment is legit :)

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by fuego_see_money · Jun 07, 2017 at 04:34 AM

The CharacterController that is built into unity is a great way to start - if you are still getting used to it, I would recommend using that instead of your own custom Rigidbody + CapsuleCollider combo.

When it comes down to it, of course, creating your own character controller using Rigidbody and CapsuleCollider is going to give you the most customized and optimized result.

For a good transition into learning how to do it yourself, check this out: FPSWalkerEnhanced

^That is the perfect way to learn about making your own controller, because you can actually look at and modify the code.

Hope this helps!

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Compiler error FPSplayer script 2 Answers

Any problem with using real weapons in a FPS game? 0 Answers

How to Implement First Shot Accuracy? 2 Answers

2D platformer. What is the best option for the main Character? 1 Answer

Making a FPS, my gun floats sideways in front of me? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges