• 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 Mar 24, 2020 at 06:01 AM by tamarar357_unity for the following reason:

Other

avatar image
0
Question by tamarar357_unity · Jan 02, 2020 at 11:19 PM · collisioncollidersassetsasset storeridgidbody

Character collider with House won't work

I have a character and it won't collide with a house. Both are assets off the Unity Asset Store. I have a ridgidbody collider and a capsule collider on my character, on the house (On the main house, not individual boards and windows) I have a box collider, but they won't collide at all! Any help?

Comment
Add comment · Show 1
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 unity_ek98vnTRplGj8Q · Jan 03, 2020 at 08:54 PM 0
Share

Will need more info here, how are you moving your character? When you say it won't collide, do you mean that OnCollisionEnter() isn't called or do you mean that your character is moving through the walls of the house?

2 Replies

  • Sort: 
avatar image
0

Answer by lgarczyn · Jan 03, 2020 at 08:48 PM

You shouldn't use both a rigidbody and character controller on the same object.

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
avatar image
0

Answer by logicandchaos · Jan 04, 2020 at 05:22 AM

There could be many things wrong with it can you post your code and show the inspector for both objects? Can you describe the problem in more detail, do the objects pass through each other or are you trying to make a collision trigger in code? Both objects need a collider that sounds good, they must both be 3d or both 2d, and one of the objects needs rigidbody also 2d or 3d to match the rest. You can check if the trigger checkbox is selected on with colliders as well.

Comment
Add comment · Show 6 · 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 tamarar357_unity · Jan 04, 2020 at 05:54 PM 0
Share

The Character passes through the house, I am not trying to use collision triggers in code. The character has a rigidbody and a collider, the house only has a box collider. The "Is Trigger" checkbox is NOT checked on either collider. Thanks here are my inspectors below...

inspectorforhouse.jpg (238.0 kB)
inspectorforcharacter.jpg (209.4 kB)
avatar image lgarczyn tamarar357_unity · Jan 04, 2020 at 06:32 PM 0
Share

Please post the code used to move the rigidbody. If you use transform.position, rigidbody.position or rigidbody.$$anonymous$$ovePosition, it will pass through objects.

avatar image tamarar357_unity lgarczyn · Jan 06, 2020 at 01:23 AM 0
Share

This is the only code I am using attached (Pumpkin$$anonymous$$ingController script) to control my character. I don't know if this helps?

charactercode.jpg (78.8 kB)
Show more comments

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

182 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

Related Questions

my thing keeps going through walls, but ridged bodies can touch the collider 0 Answers

collision contact point (NaN,NaN,NaN) 1 Answer

3D enemies keep sliding on the terrain 1 Answer

Ghost collisions problem: RigidBody player bounces, when moving on platform edges 2 Answers

Collision interpenetrating between 2 meshes 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