• 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
1
Question by cmos · Feb 17, 2010 at 10:06 PM · collisionphysicscollider

How do I prevent my object from going through certain walls?

Hi

My FPS Player is going through some walls and not through others.

I want to make all walls solid.

I created this in C4D.

Thanks, Chris

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 cregox · Jan 27, 2011 at 10:54 PM 0
Share

similar question: http://answers.unity3d.com/questions/25081/collider-not-working-when-apply-addforce-high-enough

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by AngryAnt · Mar 18, 2010 at 10:50 AM

I'm assuming you created your level geometry completely in C4D and then when importing ticked "generate colliders".

While this works well for quick tests and single complex objects, you should generally use simple colliders to mark up your scene in Unity. Not only are these much cheaper performance-wise, but also more precise. This also ensures that you know exactly what is going on in your scene physics-wise.

Approach:

  • Disable "generate colliders" for your geometry.
  • Add the geometry to your scene - of if it is already there, make sure that it has been updated to not have a mesh collider attached.
  • For each wall and other elements in the geometry hierarchy in the hierarchy view, attach a box collider (or one of the other simple colliders from the Components -> Physics menu and size it to fit with the element.
  • Profit!

Notice that it is a good idea to make the colliders a bit too "tick" - in case of walls you could just ensure that the excess collider is inside the walled up area. This helps make sure that the collider is respected by fast moving objects.

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 equalsequals · Feb 18, 2010 at 12:28 AM

The only thing I can think of is that the normals on your collision geometry might be inverted from what you are expecting.

You will have to be more specific in order to get a more accurate answer, but I find that is a general problem I see upon receiving geometry from other artists during integration.

Cheers,

==

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 Litobyte Softworks · Feb 18, 2010 at 03:21 AM

Sometime the speed of the player can be an issue...but is is also related with the TIMING your game use (Project/Time options) and also the physics.

Is your FPS player a rigidbody ?

Does it fall madly from big heights ?

Be more specific!

There is a script in the WIKI which use RAYCASTING for avoiding these problems, but usually, you won't need it.

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 Lipis · Mar 04, 2010 at 01:37 PM 0
Share

Don't ask ask questions in the answer.. it suppose to be an answer.. consider asking the questions as comments and the just answering the question. Regards

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

No one has followed this question yet.

Related Questions

No Collision 3 Answers

Do you have to have a rigidbody component for collision detection? 1 Answer

AI Players Movement for Rolling Ball Game 0 Answers

Big issue with colliders 1 Answer

How having correct bounce on a rotating pinwheel(it's more complicated)? 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