• 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 /
This question was closed Jan 21, 2015 at 06:23 PM by Juice-Tin for the following reason:

Not a simple 'answerable' question. Moving to forums.

avatar image
0
Question by Juice-Tin · Jan 21, 2015 at 05:15 PM · charactercontrollercollisions

How to tell if something HITS a charactercontroller?

So it seems character controllers will ONLY do collision detection if they are moving, and they will only detect in the direction they are moving.

alt text

You can see it works fine when I run into the object, but when the controller is idle, it does no collisions at all. As shown, I would like it to collide+be pushed by objects when not running directly at them.

How can I make it always check for collisions? Thanks!

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

  • Sort: 
avatar image
0

Answer by Owen-Reynolds · Jan 21, 2015 at 05:56 PM

Yes, this is a known thing ... lots of older discussions (why it works this way, ways to fix) if you search "unity charcontroller collision" and things of that nature.

The basic issue is that charControllers are not rigidbodies, so the system does not push them around. The way they slide off of things when they move is actually specially added to their own move command. Interaction with moving objects is usually hand-done (moving platforms, grab a swinging rope... .)

Can switch to a rigidbody on the player. Lots of work. Do this only if many things will be knocking the player around in "realistic" ways.

Depending on the problem, using OnCollisionEnter/Stay on the player and on the objects hitting the player can help. Since the player's fake capsule collider does count as a collider. Try it and see when they fire. Then you have to math-out the proper way to shove-move the player.

Comment
Add comment · Show 1 · 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
avatar image Juice-Tin · Jan 21, 2015 at 06:22 PM 0
Share

The objects are a bit complex (Think of walking on a vertical rotating gear), not something that can be easily manually coded.

I can't seem to find any other topics regarding this, only simple generic collisions ones, so I'll remake this in the forums as it seems to be more of a discussion topic than a simple answer.

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

26 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

Related Questions

Detect when CharacterController is not colliding? (SOLVED) 1 Answer

CharacterController on player, NavMesh Agent on enemies: prevent player from walking over or pushing enemies? 1 Answer

Click to Move with CharacterController 1 Answer

The proper way to use CollisionsFlags ? 0 Answers

Best way to check collisions in a 2D Game? 0 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