• 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 Verpous · Jul 21, 2019 at 08:56 PM · collisionphysicsrigidbodycharactercontrollernavmeshagent

Is it ok to move objects with CharacterControllers not through their CharacterController and without adding a kinematic Rigidbody?

I have enemies in my game that have a CharacterController and a NavMeshAgent component attached. Sometimes I move them myself through their CharacterController, and most of the time I let the NavMeshAgent take over and move them however Unity wrote it to move them (probably directly manipulating the Transform). Should I add a kinematic Rigidbody to these enemies? I know moving static colliders is considered a bad idea, but these are CharacterControllers, they were meant to be moved. But they're not always moved using the methods of the CharacterController, so maybe then it's the same as moving a static collider. I don't know.

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by ThomasOr · Jul 21, 2019 at 10:17 PM

True answer

Play around with everything, google and ducks are only sometimes your friend.

Give or take answer section

"If isKinematic is enabled, Forces, collisions or joints will not affect the rigidbody anymore. The rigidbody will be under full control of animation or script control by changing transform.position. Kinematic bodies also affect the motion of other rigidbodies through collisions or joints." - From here


In other words, if it aint broke, don't fix it. If your enemies are controlled via relative transformations (meaning is the controller adding to the position, not setting it or adding force each frame), which they probs are, having a kinematic rigidbodies will make no difference, or at least I'd assume, and is therefore pointless. However, if you wanted your enemies to fall off cliffs etc. they you may want to have a rigidbody on them with grav and non-kinematic but this is provided that you've setup collides correctly (which you probs have comment if not and I'll explain more).



Massive tangent and moderately patronising section, plz don't take it badly

You mentioned static collides in your post, kinematic rigidbody is not this. In the top right when you inspect an object you'll see a little static checkbox, if you click the dropdown to the right of that you can see the parameters which you can set to static; when one of these is ticked, say, for example lightmap static, then that will not get updated naturally at runtime. This means that if you had a massive skyscraper with 1 gazillon triangles or a complex city scene with 500 point light sources and wanted to dramatically, and I mean crazily, improve performance you can enable lightmap static (or just all static in these cases) mode so that all of the scene lights, reflections etc. will be baked (btw that's what the Window > Lighting window is for configuring and the static/mixed properties are for on the lights are for) into the objects before you) onto the object. This will help a load (without baking one of my scenes with hundreds of point light sources for realism would run at lower than 10 fps on a good gpu) with larger scenes and whilst the baked objects can't be moved, they still can have shadows cast onto them, cast shadows with new light sources and be lit up by realtime lights.



Rant about crap markdown implementation. This is in no way related to the question or to the author of said question

If anyone sees this who can truly influence answers.unity then please try to push this forward if you want.

It's basic css generation, please, please, please just throw your stuff away and copy the github style, I beg you.

.markdown-preview:not([data-use-github-style]) There you go, start with this.

But seriously, you cant even use the OG ``` or ### and above

Why would you do this to me unity

Unity, plz fix.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

239 People are following this question.

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

Related Questions

Character Controller meets Rigidbody 1 Answer

Prevent rigidbody being affected by character controller 2 Answers

Unity 4.3 CharacterController collision with physics 2D not working 1 Answer

How to change CC script to Rigidbody script 1 Answer

Character controller partially passing through rigidbody in a head on collision 2 Answers


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