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 LPGaming · Jan 10, 2013 at 02:31 AM · collisionobjectbasicfirst person

Basic Collision, Object + First Person

Alright, So I have a door that I've made in blender and I want the character to stop when it hits it, I.E not have the ability to pass through, I have a whole town and map set up that I've created in blender and I can walk through all of it. If I add box-colliders the objects just dissapear, I've also set them all to gameObjects. If anyone is going to direct me towards scripting I understand C# the most, although I can convert from javascript. I just want basic collision and I'm not understanding how to get it. I'm not looking for some high-grade physics, but not walking through houses/walls would be nice. Having a script for opening and unlocking doors is useless if you just pass through them.

EDIT: I've set mesh coliders and rigidbodies, but still nothing. I just walk straight through.

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by cdrandin · Jan 10, 2013 at 03:16 AM

When importing your models Unity offer an option to "Generate Colliders". Enable that and check what happens. Also don't forget to hit "Apply" at the bottom of the menu

Comment
Add comment · Show 2 · 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 LPGaming · Jan 10, 2013 at 05:04 AM 0
Share

Where can i find this option?

avatar image cdrandin · Jan 10, 2013 at 12:18 PM 0
Share

On the inspector panel when you are viewing an imported object. So say you have already imported your asset and it is in your project panel. Left click that object and the importing option panel will go where the inspector panel typically is. Then just do as mentioned before. If still problems try providing the building to have someone test it and check if it isn't the model its self for some reason.

avatar image
0

Answer by aardvarkk · Jan 10, 2013 at 02:45 AM

I'm just getting back into Unity, so take this answer with a grain of salt, but can't you convert your whole level mesh into a big collision mesh? Then you'll collide with all of it...

Comment
Add comment · Show 4 · 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 LPGaming · Jan 10, 2013 at 03:07 AM 0
Share

When I try to add any type of collision using the Component menu, the object is no longer visable, and I can still walk through where it would originally be.

avatar image aardvarkk · Jan 10, 2013 at 03:10 AM 0
Share

Have you tried adding a $$anonymous$$esh Collider to whatever mesh you were trying to collide with? In a sample project, this works when I add a $$anonymous$$esh Collider to a Cube, for instance. Is this what you're looking for? http://docs.unity3d.com/Documentation/Components/class-$$anonymous$$eshCollider.html

avatar image LPGaming · Jan 10, 2013 at 05:28 AM 0
Share

When I attempt to do this, the object is no longer there. Once I hit play, the object cannot be seen and has no collision.

avatar image LPGaming · Jan 10, 2013 at 05:34 AM 0
Share

Also, I've gotten it to load without the object beco$$anonymous$$g non existant, although there is not a collision deteection of any type. I can walk straight through it.

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

10 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

Related Questions

Multiple Cars not working 1 Answer

How do I check if an object is touching another object? 1 Answer

collision with objects, physics 1 Answer

How do I increase speed after collision? 2 Answers

Collider2D.GetContacts() always returns only 1 contact 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