Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 kingsman141 · May 07, 2013 at 01:51 AM · colliderscubemesh colliderbox collider

Can't go into building because of collider around it

To set up the scenario, I have a building with a hole, a passageway if you will, bigger than the character. At the moment, the character is a cube. The character has a rigidbody and box collider. The building has a mesh collider and a rigidbody. I want the character to be able to just casually walk into the building and look at what is inside it.

My problem is that there is a collider around the entire building so I cannot walk straight into the passageway. I want to be able to walk into the hole, but I cannot find a collider that I can only apply to the walls and not the passageway.

How can I fix this so the passageway exists, the building has a collider (so stuff cannot just walk through the walls), and so the character can walk into the building without a problem?

Comment
Add comment · Show 5
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 Ice Koobs · May 07, 2013 at 02:08 AM 0
Share

Is it possible for you to edit the model of the building? With a mesh collider your character/cube should be able to walk anywhere in the building as long as there is no mesh in the way. $$anonymous$$aybe you have some transparent wall blocking the entrance way?

avatar image robertbu · May 07, 2013 at 03:47 AM 0
Share

A brute force approach would be to use a bunch of box colliders and leave the door open. Since a game object can only have one collider of each type, you would need to put them on empty child objects.

avatar image Eric5h5 · May 07, 2013 at 04:03 AM 1
Share

Why does the building have a rigidbody?

avatar image Fattie · May 07, 2013 at 07:57 AM 1
Share

how else could you make it fly ??!

avatar image Eric5h5 · May 07, 2013 at 12:42 PM 1
Share

Indeed, it would be a poor game without a flying house....

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by lukejaparidze · May 07, 2013 at 04:23 AM

it usually depends on the model that you use. when unity generates mesh colliders, it takes every object in it. use the transform tool and click on your passageway (assuming that your building isnt just one giant mesh) in the properties, disable or delete the mesh collider on the object. good luck :)

Comment
Add comment · Show 8 · 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 kingsman141 · May 07, 2013 at 10:10 PM 0
Share

What if it is one big giant mesh imported from Blender? Is there a way to get rid of colliders on the empty space and just put colliders on walls?

avatar image Eric5h5 · May 07, 2013 at 10:20 PM 0
Share

Don't check "convex". The point of a (non-convex) mesh collider is that it matches the mesh.

avatar image kingsman141 · May 07, 2013 at 10:50 PM 0
Share

But then it is too easy for the player to go through the wall at a high velocity.

avatar image Eric5h5 · May 07, 2013 at 11:13 PM 0
Share

You must not check convex. That's the only solution. As for going through walls, why are you allowing the player to achieve velocities so high in the first place?

avatar image kingsman141 · May 07, 2013 at 11:20 PM 0
Share

Well, if the player were to board a spaceship and move around in it at the same time the spaceship is moving, there would be a high velocity.

Show more comments
avatar image
0

Answer by 10001110101 · May 07, 2013 at 11:39 PM

I would break the mesh up into modular assets with separate collision. It will create a modular asset set that will allow you to build more than just one building. It will also allow you to figure out where your collisions are becoming problematic.

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

17 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

Related Questions

Mesh Collider falling through Box Colliders 2 Answers

I can walk through an object with a mesh collider? 2 Answers

Walking in A Inner Sphere ?,Inner Sphere Walk 2 Answers

problem in Archery game 1 Answer

How to use different and distinguish between different box colliders? 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