• 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 SoBiT · Jul 13, 2013 at 05:16 PM · collisionrigidbodycharactercontrollerkinematicdragrigidbody

CharacterController gets pushed by RigidBodies

Hello Community

My CC gets pushed by moving Rigidbodies. Is there a way to avoid this? I use the DragRigidbodies.js Script from the wiki and whenever I drag one and it collides with my CC, my CC gets pushed away from the RigidBody.

The dragged RigidBodies are set to kinematic by the script, could this be the problem?

I hope someone has an idea how to fix this :)

Thanks in advance!

Comment
Add comment · Show 4
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 James U · Jul 13, 2013 at 06:04 PM 0
Share

I think it would be helpful to mention what you WANT to happen.

avatar image SoBiT · Jul 13, 2013 at 06:14 PM 0
Share

I just want the CC to be "stronger" that the rigidbodies but still collide with them. The CC's position should only be changable through script and not thorugh collisions with rigidbodies.

avatar image cdrandin · Jul 13, 2013 at 06:25 PM 0
Share

The object that has the CC set the mass of that object's rigidbody to something like 1000.

avatar image SoBiT · Jul 13, 2013 at 07:09 PM 0
Share

You shouldn't use a CC and a rigidbody on the same object and I won't do that.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by James U · Jul 13, 2013 at 08:52 PM

It seems that you have a RigidBody attached to your CharacterController. From Unity's Reference Documentation, it seems like they suggest not using both a CharacterController and a RigidBody for the same object.

Read this if you haven't.

Unity - Character Controller

At the bottom, it says, "The Character Controller can not be affected by objects through physics."

Comment
Add comment · Show 5 · 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 SoBiT · Jul 13, 2013 at 09:16 PM 0
Share

Nope, please look at the comment above, that's what I told cdrandin. The thing is, that the rigidbodies are $$anonymous$$NINE$$anonymous$$ATIC, so there is no physic at all. $$anonymous$$inematic rigidbodies push my CC.

avatar image cdrandin · Jul 13, 2013 at 09:45 PM 0
Share

If that is the case, then could you do something that if such objects are very close to each other then ignore the collisions using Physics.IgnoreCollision.

avatar image SoBiT · Jul 13, 2013 at 10:49 PM 0
Share

Well, I still need collisions. The thing I want to reach is "$$anonymous$$ake my CC not movable by kinetic rigidbodies". But thanks for trying to help me. I'm getting mad with this problem!

avatar image James U · Jul 14, 2013 at 09:37 PM 0
Share

Ok, so how do you want the objects to react when CC runs into them? I mean, will they then behave like normal physics? Will they turn around going at the same speed? Because you'll probably have to code exactly how you want them to act.

avatar image SoBiT · Jul 14, 2013 at 09:59 PM 0
Share

This issue only appears, when the objects are dragged by the DragRigidbody.js script, so the CC will not "run" into them. But when they collide while they are dragged, they should just be "blocked" by the CC, Like the CC was a fixed wall and not movable. I found another dragging script, I'll try this tomorrow, maybe it works better :) Thanks again for trying to help me.

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

16 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

Related Questions

Having issues with Rigidbody and CharacterController colision 2 Answers

Any way to ignore collision between rigidbodies and colliders/character controllers? 1 Answer

Character Controller meets Rigidbody 1 Answer

Kinematic rigidbodies collision 0 Answers

Moving a player on a rigidbody platform that can collide 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